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

Unified Diff: gpu/command_buffer/client/gl_in_process_context.cc

Issue 271763002: Clean up SyncCompositorFactory context creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: inline Created 6 years, 7 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
« no previous file with comments | « gpu/command_buffer/client/gl_in_process_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gl_in_process_context.cc
diff --git a/gpu/command_buffer/client/gl_in_process_context.cc b/gpu/command_buffer/client/gl_in_process_context.cc
index 2b5e559ba64fd5c1386c15c183131f03ef7df3ed..33d41563dea137e5d8ec58db8bfce92f9368c443 100644
--- a/gpu/command_buffer/client/gl_in_process_context.cc
+++ b/gpu/command_buffer/client/gl_in_process_context.cc
@@ -337,25 +337,33 @@ GLInProcessContext* GLInProcessContext::CreateContext(
return context.release();
}
-// static
-GLInProcessContext* GLInProcessContext::CreateWithSurface(
- scoped_refptr<gfx::GLSurface> surface,
+GLInProcessContext* GLInProcessContext::Create(
scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
+ scoped_refptr<gfx::GLSurface> surface,
+ bool is_offscreen,
+ gfx::AcceleratedWidget window,
+ const gfx::Size& size,
GLInProcessContext* share_context,
+ bool use_global_share_group,
const GLInProcessContextAttribs& attribs,
gfx::GpuPreference gpu_preference) {
- scoped_ptr<GLInProcessContextImpl> context(
- new GLInProcessContextImpl());
- if (!context->Initialize(
- surface,
- surface->IsOffscreen(),
- false,
- share_context,
- gfx::kNullAcceleratedWidget,
- surface->GetSize(),
- attribs,
- gpu_preference,
- service))
+ DCHECK(!use_global_share_group || !share_context);
+ if (surface.get()) {
+ DCHECK_EQ(surface->IsOffscreen(), is_offscreen);
+ DCHECK(surface->GetSize() == size);
+ DCHECK_EQ(gfx::kNullAcceleratedWidget, window);
+ }
+
+ scoped_ptr<GLInProcessContextImpl> context(new GLInProcessContextImpl());
+ if (!context->Initialize(surface,
+ is_offscreen,
+ use_global_share_group,
+ share_context,
+ gfx::kNullAcceleratedWidget,
+ size,
+ attribs,
+ gpu_preference,
+ service))
return NULL;
return context.release();
« no previous file with comments | « gpu/command_buffer/client/gl_in_process_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698