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

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 - Avoid optional image manager creation/destroy in context group Created 6 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/gpu_command_buffer_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..98f4d7ea44a990ab687cd1ce913053a5630dfacd 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -404,6 +404,14 @@ GpuChannel::~GpuChannel() {
STLDeleteElements(&deferred_messages_);
if (preempting_flag_.get())
preempting_flag_->Reset();
+
+ bool lost_context = false;
+ for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); !it.IsAtEnd();
+ it.Advance()) {
+ lost_context = it.GetCurrentValue()->CheckContextLost();
reveman 2014/06/04 15:29:35 This will set lost_context to whatever is returned
sohanjg 2014/06/05 02:57:57 Can you please suggest how we should get the have_
sohanjg 2014/06/05 06:33:57 When i checked, the stubmap size is 1, how about w
reveman 2014/06/05 15:58:01 We'll have one image manager per stub once we've C
sohanjg 2014/06/06 02:30:03 I see. Is waiting for the refactor the only option
+ }
+ if (image_manager_)
+ image_manager_->Destroy(!lost_context);
}
void GpuChannel::Init(base::MessageLoopProxy* io_message_loop,
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698