diff options
-rw-r--r-- | chrome/renderer/ggl/ggl.cc | 3 | ||||
-rw-r--r-- | chrome/renderer/ggl/ggl.h | 2 | ||||
-rw-r--r-- | chrome/renderer/webgles2context_impl.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc index d925fe2..152888f 100644 --- a/chrome/renderer/ggl/ggl.cc +++ b/chrome/renderer/ggl/ggl.cc @@ -319,9 +319,8 @@ Context* GetCurrentContext() { #endif } -bool SwapBuffers() { +bool SwapBuffers(Context* context) { #if defined(ENABLE_GPU) - Context* context = GetCurrentContext(); if (!context) return false; diff --git a/chrome/renderer/ggl/ggl.h b/chrome/renderer/ggl/ggl.h index cd02c1f..76bbfcb 100644 --- a/chrome/renderer/ggl/ggl.h +++ b/chrome/renderer/ggl/ggl.h @@ -70,7 +70,7 @@ Context* GetCurrentContext(); // last call. For an offscreen context, resolve everything that has been // rendered since the last call to a copy that can be accessed by the parent // context. -bool SwapBuffers(); +bool SwapBuffers(Context* context); // Destroy the given GGL context. bool DestroyContext(Context* context); diff --git a/chrome/renderer/webgles2context_impl.cc b/chrome/renderer/webgles2context_impl.cc index 374ea13..994d750 100644 --- a/chrome/renderer/webgles2context_impl.cc +++ b/chrome/renderer/webgles2context_impl.cc @@ -72,7 +72,7 @@ bool WebGLES2ContextImpl::destroy() { } bool WebGLES2ContextImpl::swapBuffers() { - return ggl::SwapBuffers(); + return ggl::SwapBuffers(context_); } #endif // defined(ENABLE_GPU) diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc index 2f91cce..c691b46 100644 --- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc +++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc @@ -90,7 +90,7 @@ void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) { // Force a SwapBuffers to get the framebuffer to resize, even though // we aren't directly rendering from the back buffer yet. - ggl::SwapBuffers(); + ggl::SwapBuffers(context_); #ifdef FLIP_FRAMEBUFFER_VERTICALLY scanline_.reset(new uint8[width * 4]); |