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

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

Issue 1652873002: Android: Use virtualized context only for those with compatible config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 10 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/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);

Powered by Google App Engine
This is Rietveld 408576698