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

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

Issue 2132913002: Remove VirtualGLApi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extra cleanup Created 4 years, 5 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
« no previous file with comments | « no previous file | ui/gl/gl_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c2776d4c8793c0d49372b952ce154f81682480f..6b763b6c55f1345d9da2178b373e6406ec5a0fee 100644
--- a/gpu/command_buffer/service/gl_context_virtual.cc
+++ b/gpu/command_buffer/service/gl_context_virtual.cc
@@ -25,22 +25,7 @@ GLContextVirtual::GLContextVirtual(gl::GLShareGroup* share_group,
bool GLContextVirtual::Initialize(gl::GLSurface* compatible_surface,
gl::GpuPreference gpu_preference) {
SetGLStateRestorer(new GLStateRestorerImpl(decoder_));
-
- // Virtual contexts obviously can't make a context that is compatible
- // with the surface (the context already exists), but we do need to
- // make a context current for SetupForVirtualization() below.
- if (!IsCurrent(compatible_surface)) {
- if (!shared_context_->MakeCurrent(compatible_surface)) {
no sievers 2016/07/08 17:52:19 So this would potentially defer catching an incomp
piman 2016/07/08 18:30:58 MakeVirtuallyCurrent below will effectively call M
no sievers 2016/07/08 18:34:56 Ah you're right, since this here was using the sam
- // This is likely an error. The real context should be made as
- // compatible with all required surfaces when it was created.
- LOG(ERROR) << "Failed MakeCurrent(compatible_surface)";
- return false;
- }
- }
-
- shared_context_->SetupForVirtualization();
- shared_context_->MakeVirtuallyCurrent(this, compatible_surface);
- return true;
+ return shared_context_->MakeVirtuallyCurrent(this, compatible_surface);
}
void GLContextVirtual::Destroy() {
« no previous file with comments | « no previous file | ui/gl/gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698