Platform/GFX/Surfaces: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 113: Line 113:


Other CompositableClients have their own custom code that is not currently using anything like an EGLStream, but could be.
Other CompositableClients have their own custom code that is not currently using anything like an EGLStream, but could be.
= Understanding what Android 4.3 is doing =
In Android 4.3, as we said above, there is a universal surface type, android::GraphicBuffer. Moreover, there are shared surface-passing mechanisms (BufferQueue). So it looks like this:
                *** Figure 3: overview of Android's surface-passing ***
                          .                            .
                          .                            .
                          .                            .          +----------+
                          .                            .          |EGLSurface|
                          .                            .          |  handle  |
                          .                            .          +----------+
                          .                            .
                          .                            .                |
                          .                            .                | references
                          .                            .                v
                          .                            .                                dequeue()
        +--------+        .      +-----------+        .        +------------------+  -------------->  +------+
        |Consumer|  <-----------  |BufferQueue|  <------------  |  Surface class  |                  |Client|
        +--------+    consumes  +-----------+    presents    |e.g. ANativeWindow|                  |      |
                          .                            .        +------------------+  <--------------  +------+
            |            .            |              .                                  queue()
            | holds      .            | wraps        .                                                  |
            |            .            |              .                                                  | holds
            v            .            v              .                                                  v
                          .                            .
      +-------------+    .    +---------------+      .                                            +-------------+
      |GraphicBuffer|    .    |  queue impl.  |      .                                            |GraphicBuffer|
      +-------------+    .    +---------------+      .                                            +-------------+
                          .                            .
                          .            |              .
                          .            | holds        .
                          .            v              .
                          .                            .
                          .      +-------------+      .
                          .      |GraphicBuffer|      .
                          .      +-------------+      .
                          .                            .
                          .                            .
                          .                            .
                          .                            .
                +----------------------+    +----------------------+
                |  In Mozilla's case  |    |  In Android's case  |
                |case, the IPC frontier|    |case, the IPC frontier|
                |      is here        |    |      is here        |
                +----------------------+    +----------------------+


= Developing a standard MozSurface abstraction =
= Developing a standard MozSurface abstraction =
Line 131: Line 179:




   *** Figure 3: The plan for MozSurface ***
   *** Figure 4: The plan for MozSurface ***
    
    
   
   
Line 170: Line 218:




         *** Figure 4. JeffG and Dan's magic swap chain that allows ***
         *** Figure 5. JeffG and Dan's magic swap chain that allows ***
         ***          consumers on multiple processes              ***
         ***          consumers on multiple processes              ***
   
   
Confirmed users
753

edits

Navigation menu