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

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

Issue 301793003: During image destroy, delete textures only if we have a GL context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP - review comments addressed Created 6 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: content/common/gpu/gpu_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 1c8e4f95f3cb853e72a7ab1829288f19ed86b002..b8d62f7c1c360ba8c13d0a8bcbcf9e57a55b1586 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -404,6 +404,10 @@ GpuChannel::~GpuChannel() {
STLDeleteElements(&deferred_messages_);
if (preempting_flag_.get())
preempting_flag_->Reset();
+
+ bool have_context = gfx::GLContext::GetCurrent()->IsCurrent(NULL);
+ if (image_manager_)
+ image_manager_->Destroy(have_context);
reveman 2014/06/03 15:57:54 I don't think this will work. What if the context
sohanjg 2014/06/04 06:39:02 I have tried checking the context from GpuCommandB
}
void GpuChannel::Init(base::MessageLoopProxy* io_message_loop,
« no previous file with comments | « no previous file | content/common/gpu/stream_texture_android.h » ('j') | gpu/command_buffer/service/context_group.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698