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

Unified Diff: gpu/command_buffer/service/gpu_scheduler_mac.cc

Issue 7021014: GLContext no longer holds a pointer to a GLSurface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
Index: gpu/command_buffer/service/gpu_scheduler_mac.cc
===================================================================
--- gpu/command_buffer/service/gpu_scheduler_mac.cc (revision 86168)
+++ gpu/command_buffer/service/gpu_scheduler_mac.cc (working copy)
@@ -39,7 +39,7 @@
// Create a GLContext and attach the surface.
scoped_ptr<gfx::GLContext> context(
- gfx::GLContext::CreateGLContext(surface.release(), parent_context));
+ gfx::GLContext::CreateGLContext(parent_context, surface.get()));
if (!context.get()) {
LOG(ERROR) << "CreateGLContext failed.\n";
Destroy();
@@ -66,7 +66,8 @@
}
}
- return InitializeCommon(context.release(),
+ return InitializeCommon(surface.release(),
+ context.release(),
size,
disallowed_extensions,
allowed_extensions,
@@ -87,7 +88,7 @@
uint64 GpuScheduler::SetWindowSizeForIOSurface(const gfx::Size& size) {
// This is called from an IPC handler, so it's undefined which context is
// current. Make sure the right one is.
- decoder_->GetGLContext()->MakeCurrent();
+ decoder_->GetGLContext()->MakeCurrent(decoder_->GetGLSurface());
ResizeOffscreenFrameBuffer(size);
decoder_->UpdateOffscreenFrameBufferSize();
@@ -143,7 +144,7 @@
void GpuScheduler::WillSwapBuffers() {
DCHECK(decoder_.get());
DCHECK(decoder_->GetGLContext());
- DCHECK(decoder_->GetGLContext()->IsCurrent());
+ DCHECK(decoder_->GetGLContext()->IsCurrent(decoder_->GetGLSurface()));
++swap_buffers_count_;

Powered by Google App Engine
This is Rietveld 408576698