DescriptionAdd initial GpuMemoryBufferSurfaceTexture implementation.
This adds the plumbing and allocation logic needed to implement
a surface texture backed GpuMemoryBuffer on Android. The allocation
flow is the same as other GpuMemoryBuffer implementations. That is;
the browser process decides if a renderer is allowed to allocate
a new GpuMemoryBuffer or not. Successful allocation results in
a valid GpuMemoryBufferHandle being returned to the renderer. This
handle can be used to create a GpuMemoryBufferImpl instance on the
renderer side, which can be mapped into the renderer address space
and used as existing GpuMemoryBufferImpls. The same handle can also
be used to register the GpuMemoryBuffer with the GPU process and
and create a GLImage that can be used for sampling.
Two new interfaces are added to allow sharing of surface textures
across process boundaries:
SurfaceTextureLookup, this interface is used by a renderer to
acquire a native widget for a surface texture. The native widget
allows the renderer to map the storage of the surface texture into
its address space. The current implementation of this interface uses
Java Binder IPC to share the surface texture surface with a
renderer process.
SurfaceTextureTracker, this interface is used by GLImage
implementation to acquire ownership of surface textures allocated
by the browser process. Current implementation of this interface
only works with GLImage instances in the browser process. A
different implementation can be added to support out of process
GLImage instances.
This is currently limited to buffered surface textures and
GL_TEXTURE_EXTERNAL_OES texture target.
BUG=269808
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260498
Patch Set 1 #Patch Set 2 : #
Total comments: 36
Patch Set 3 : Fix potential races and limit surface texture access to specific renderer. #Patch Set 4 : Add ::InitInstance comments. #
Total comments: 11
Patch Set 5 : Remove unnecessary calls to DetachFromGLContext #Patch Set 6 : add missing include #Patch Set 7 : Add CalledOnValidThread() check. #
Total comments: 4
Patch Set 8 : address review feedback #
Total comments: 5
Patch Set 9 : use base::ProcessHandle explicitly in a few places #
Total comments: 11
Patch Set 10 : use child process id instead of pid for secondary id #Patch Set 11 : java ref stuff.. #Patch Set 12 : rebase #Messages
Total messages: 60 (0 generated)
|