Platform/GFX/Surfaces: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 177: Line 177:
Once the above items are done, we should be able to call MozSurface the class created from the merging of TextureClient and TextureHost, and declare it our universal surface abstraction to use in all producer/consumer/ipc contexts.
Once the above items are done, we should be able to call MozSurface the class created from the merging of TextureClient and TextureHost, and declare it our universal surface abstraction to use in all producer/consumer/ipc contexts.


Here is a diagram that fits together the present TextureClient/TextureHost classes, the near-future PTexture protocol pairing them, and how they would fit in the future MozSurface abstraction:


= Concrete short-term plans to move towards "MozSurface" =
In the short term, we just iteratively switch more and more things to use TextureClient instead of less suitable or less generic surface abstractions (at least SurfaceDescriptor and probably SharedSurface), extending and fixing TextureClient along the way as needed.
Eventually, TextureClient will be "MozSurface" (or whatever it will be called then).


   *** Figure 4: The plan for MozSurface ***
   *** Figure 4: The plan for MozSurface ***
 
 
  Land PTexture
                    MozSurface
      897452
   +-------------------------------------------+
        |                Refcount ISurfaceAllocator
   |                                           |
        |              Split it away from ClientLayerManager
   | +-------------+            +-----------+ |
        |                  Allow checking if connection still up
   | |TextureClient| <---------> |TextureHost| |
        V                    933082
  | +-------------+   PTexture  +-----------+ |
       
   |                                          |
    Do not invoke            /
   +-------------------------------------------+
    RemoveTextureClient    /
    manually              /
      926745              /
                        /
        |              /
        V              V
     
  Replace bad uses of
  SurfaceDescriptor
  by TextureClient
  for layer types that
   already use new textures
    
        |
        V
       
  Replace all remaining
   bad uses of            <------ Finish port to
  SurfaceDescriptor              new textures
  by TexureClient                893300
   
        |
        V
                     
   Replace SharedSurface  <--- Make required changes to
        by TextureClient        TextureClient so it can
                                replace SharedSurface
    |                |
    |               |
    |               V
    |   
    |              Keep iterating on other
    |              existing "surface"-like
    |               abstractions as needed
    V
   
   Use TextureClient also
   in main-thread-compositing  <---     Merge TextureHost
  use cases                        (at least GetTextureSource)
  (if there still are any)            into TextureClient
                                      call that "MozSurface"
 


= Developing a standard MozStream abstraction =
= Developing a standard MozStream abstraction =
Confirmed users
753

edits

Navigation menu