Index: gpu/command_buffer/service/gl_context_virtual.cc |
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc |
index 77341a9cb3f857d515d4973ba1913a5985cdc2c8..80bde8879a58a7a9d5fb419300d1b4f14e403d11 100644 |
--- a/gpu/command_buffer/service/gl_context_virtual.cc |
+++ b/gpu/command_buffer/service/gl_context_virtual.cc |
@@ -27,6 +27,7 @@ GLContextVirtual::GLContextVirtual( |
bool GLContextVirtual::Initialize( |
gfx::GLSurface* compatible_surface, gfx::GpuPreference gpu_preference) { |
SetGLStateRestorer(new GLStateRestorerImpl(decoder_)); |
+ format_ = compatible_surface->GetFormat(); |
// Virtual contexts obviously can't make a context that is compatible |
// with the surface (the context already exists), but we do need to |
@@ -50,6 +51,10 @@ void GLContextVirtual::Destroy() { |
shared_context_ = NULL; |
} |
+void GLContextVirtual::UpdateSharedContext(GLContext* context) { |
+ shared_context_ = context; |
+} |
+ |
bool GLContextVirtual::MakeCurrent(gfx::GLSurface* surface) { |
if (decoder_.get()) |
return shared_context_->MakeVirtuallyCurrent(this, surface); |