summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/gpu_processor_mac.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gpu_processor_mac.cc b/gpu/command_buffer/service/gpu_processor_mac.cc
index 19d2734..97b38a4 100644
--- a/gpu/command_buffer/service/gpu_processor_mac.cc
+++ b/gpu/command_buffer/service/gpu_processor_mac.cc
@@ -67,8 +67,14 @@ void GPUProcessor::Destroy() {
}
uint64 GPUProcessor::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();
+
ResizeOffscreenFrameBuffer(size);
decoder_->UpdateOffscreenFrameBufferSize();
+
+ // Note: The following line changes the current context again.
return surface_->SetSurfaceSize(size);
}