Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1749)

Unified Diff: content/renderer/gpu/renderer_gl_context.h

Issue 7205012: RendererGLContext supports reparenting a GL context. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/gpu/renderer_gl_context.h
===================================================================
--- content/renderer/gpu/renderer_gl_context.h (revision 89700)
+++ content/renderer/gpu/renderer_gl_context.h (working copy)
@@ -108,12 +108,15 @@
// attribute/value pairs.
static RendererGLContext* CreateOffscreenContext(
GpuChannelHost* channel,
- RendererGLContext* parent,
const gfx::Size& size,
const char* allowed_extensions,
const int32* attrib_list,
const GURL& active_url);
+ // Sets the parent context. If any parent textures have been created for
+ // another parent, it is important to delete them before changing the parent.
+ bool SetParent(RendererGLContext* parent);
+
// Resize an offscreen frame buffer. The resize occurs on the next call to
// SwapBuffers. This is to avoid waiting until all pending GL calls have been
// executed by the GPU process. Everything rendered up to the call to
@@ -183,8 +186,7 @@
bool GetChildToParentLatch(uint32* child_to_parent_latch);
private:
- RendererGLContext(GpuChannelHost* channel,
- RendererGLContext* parent);
+ explicit RendererGLContext(GpuChannelHost* channel);
bool Initialize(bool onscreen,
gfx::PluginWindowHandle render_surface,

Powered by Google App Engine
This is Rietveld 408576698