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

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

Issue 7669072: Use 3D graphics context shareResources flag to decide whether a context should share resources. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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.cc
===================================================================
--- content/renderer/gpu/renderer_gl_context.cc (revision 97282)
+++ content/renderer/gpu/renderer_gl_context.cc (working copy)
@@ -82,7 +82,6 @@
RendererGLContext* RendererGLContext::CreateViewContext(
GpuChannelHost* channel,
int render_view_id,
- bool share_resources,
RendererGLContext* share_group,
const char* allowed_extensions,
const int32* attrib_list,
@@ -93,8 +92,6 @@
true,
render_view_id,
gfx::Size(),
- share_resources,
- false,
share_group,
allowed_extensions,
attrib_list,
@@ -118,7 +115,6 @@
RendererGLContext* RendererGLContext::CreateOffscreenContext(
GpuChannelHost* channel,
const gfx::Size& size,
- bool share_resources,
RendererGLContext* share_group,
const char* allowed_extensions,
const int32* attrib_list,
@@ -129,8 +125,6 @@
false,
0,
size,
- share_resources,
- false,
share_group,
allowed_extensions,
attrib_list,
@@ -307,8 +301,6 @@
bool RendererGLContext::Initialize(bool onscreen,
int render_view_id,
const gfx::Size& size,
- bool share_resources,
- bool bind_generates_resource,
RendererGLContext* share_group,
const char* allowed_extensions,
const int32* attrib_list,
@@ -323,6 +315,8 @@
// Ensure the gles2 library is initialized first in a thread safe way.
g_gles2_initializer.Get();
+ bool share_resources = true;
+ bool bind_generates_resources = true;
piman 2011/08/26 23:18:57 The default was false before (see callers). Is it
apatrick_chromium 2011/08/26 23:40:01 I was deliberate. I want the default semantics to
std::vector<int32> attribs;
while (attrib_list) {
apatrick_chromium 2011/08/26 19:21:13 If attrib_list is null then it want get beyond the
int32 attrib = *attrib_list++;
@@ -339,6 +333,12 @@
attribs.push_back(attrib);
attribs.push_back(*attrib_list++);
jbates 2011/08/26 19:04:35 I know this was already here, but should this chec
break;
+ case SHARE_RESOURCES:
+ share_resources = !!(*attrib_list++);
jbates 2011/08/26 19:04:35 (same here)
+ break;
+ case BIND_GENERATES_RESOURCES:
+ bind_generates_resources = !!(*attrib_list++);
jbates 2011/08/26 19:04:35 (same here)
+ break;
case NONE:
attribs.push_back(attrib);
attrib_list = NULL;
@@ -424,7 +424,7 @@
transfer_buffer.ptr,
transfer_buffer_id_,
share_resources,
- bind_generates_resource);
+ bind_generates_resources);
size_ = size;

Powered by Google App Engine
This is Rietveld 408576698