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

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

Issue 15925007: Virtual context MakeCurrent tweaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 8051e06c3b935105f84f1863a7c524fb04783183..ea507a163cc7fa87f6465c69f83fca1a1044083a 100644
--- a/gpu/command_buffer/service/gl_context_virtual.cc
+++ b/gpu/command_buffer/service/gl_context_virtual.cc
@@ -54,19 +54,15 @@ void GLContextVirtual::Destroy() {
}
bool GLContextVirtual::MakeCurrent(gfx::GLSurface* surface) {
- // TODO(epenner): We should avoid bypassing MakeVirtuallyCurrent() below
- // (return false or DCHECK when !decoder). To do this we must reorder
- // tear-down in GpuCommandBufferStub::Destroy().
if (decoder_.get())
- shared_context_->MakeVirtuallyCurrent(this, surface);
- else if (!IsCurrent(surface))
- shared_context_->MakeCurrent(surface);
- return true;
+ return shared_context_->MakeVirtuallyCurrent(this, surface);
+
+ LOG(ERROR) << "Trying to make virtual context current without decoder.";
epenner 2013/05/28 22:57:21 Me like.
+ return false;
}
void GLContextVirtual::ReleaseCurrent(gfx::GLSurface* surface) {
- if (IsCurrent(surface))
- shared_context_->ReleaseCurrent(surface);
+ shared_context_->ReleaseCurrent(surface);
}
bool GLContextVirtual::IsCurrent(gfx::GLSurface* surface) {

Powered by Google App Engine
This is Rietveld 408576698