summaryrefslogtreecommitdiffstats
path: root/ui/gfx
diff options
context:
space:
mode:
authorsievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-10 18:00:34 +0000
committersievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-10 18:00:34 +0000
commit34466d02f35920cfbe0f1a3441a2a2c0724e0424 (patch)
treea5991a68e582b9b7be194742f20954569c36b42d /ui/gfx
parent120cf540da701f19e9017cf7e603b2946aa88530 (diff)
downloadchromium_src-34466d02f35920cfbe0f1a3441a2a2c0724e0424.zip
chromium_src-34466d02f35920cfbe0f1a3441a2a2c0724e0424.tar.gz
chromium_src-34466d02f35920cfbe0f1a3441a2a2c0724e0424.tar.bz2
Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages: - allow tearing down and recreating the UI parent context without losing the renderer contexts - do not require a context to be able to generate textures when creating the GLSurfaceHandle - clearer ownership semantics that potentially allows for more robust and easier lost context handling/thumbnailing/etc., since a texture is at any given time owned by either: UI parent, mailbox, or TextureImageTransportSurface - simplify frontbuffer protection logic; the frontbuffer textures are now owned by RWHV where they are refcounted The TextureImageTransportSurface informs RenderWidgetHostView of the mailbox names for the front- and backbuffer textures by associating them with a surface_handle (1 or 2) in the AcceleratedSurfaceNew message. During SwapBuffers() or PostSubBuffer() cycles, it then uses produceTextureCHROMIUM() and consumeTextureCHROMIUM() to transfer ownership between renderer and browser compositor. RWHV sends back the surface_handle of the buffer being returned with the Swap ACK (or 0 if no buffer is being returned in which case TextureImageTransportSurface will allocate a new texture - note that this could be used to simply keep textures for thumbnailing). BUG=154815,139616 TBR=sky@chromium.org NOTRY=True Review URL: https://chromiumcodereview.appspot.com/11194042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx')
-rw-r--r--ui/gfx/native_widget_types.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h
index 6dbc4e7..22a6756 100644
--- a/ui/gfx/native_widget_types.h
+++ b/ui/gfx/native_widget_types.h
@@ -278,30 +278,19 @@ struct GLSurfaceHandle {
: handle(kNullPluginWindow),
transport(false),
parent_gpu_process_id(0),
- parent_client_id(0),
- parent_context_id(0),
- sync_point(0) {
- parent_texture_id[0] = 0;
- parent_texture_id[1] = 0;
+ parent_client_id(0) {
}
GLSurfaceHandle(PluginWindowHandle handle_, bool transport_)
: handle(handle_),
transport(transport_),
parent_gpu_process_id(0),
- parent_client_id(0),
- parent_context_id(0),
- sync_point(0) {
- parent_texture_id[0] = 0;
- parent_texture_id[1] = 0;
+ parent_client_id(0) {
}
bool is_null() const { return handle == kNullPluginWindow && !transport; }
PluginWindowHandle handle;
bool transport;
int parent_gpu_process_id;
uint32 parent_client_id;
- uint32 parent_context_id;
- uint32 parent_texture_id[2];
- uint32 sync_point;
};
// AcceleratedWidget provides a surface to compositors to paint pixels.