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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 15925007: Virtual context MakeCurrent tweaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: keep explicit surface ref release Created 7 years, 6 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 | content/common/gpu/image_transport_surface_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index de9caf7869c4a19e4c3c122b7979aca4301c59a0..2e81f6df85ee3f04f527c4040a566e81c70ec1f9 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -358,23 +358,15 @@ void GpuCommandBufferStub::Destroy() {
destruction_observers_,
OnWillDestroyStub());
- scoped_refptr<gfx::GLContext> context;
if (decoder_) {
- context = decoder_->GetGLContext();
decoder_->Destroy(have_context);
decoder_.reset();
}
command_buffer_.reset();
- // Make sure that context_ is current while we destroy surface_, because
- // surface_ may have GL resources that it needs to destroy, and will need
- // context_ to be current in order to not leak these resources.
- if (context.get())
- context->MakeCurrent(surface_.get());
+ // Remove this after crbug.com/248395 is sorted out.
surface_ = NULL;
- if (context.get())
- context->ReleaseCurrent(NULL);
}
void GpuCommandBufferStub::OnInitializeFailed(IPC::Message* reply_message) {
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698