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

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

Issue 2378583003: Ping watchdog thread during GpuChannel destruction (Closed)
Patch Set: remove throttling Created 4 years, 2 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/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 54b2eafdcde9d4cdf75ca64988c4df0ee714b332..d5b765420e7b741a8fce2e4c39346e9ceefb64d1 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -27,6 +27,7 @@
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/memory_tracking.h"
+#include "gpu/command_buffer/service/progress_reporter.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_state_restorer.h"
@@ -359,11 +360,19 @@ TextureManager::~TextureManager() {
this);
}
-void TextureManager::Destroy(bool have_context) {
+void TextureManager::Destroy(bool have_context,
+ ProgressReporter* progress_reporter) {
have_context_ = have_context;
- textures_.clear();
+
+ while (!textures_.empty()) {
+ textures_.erase(textures_.begin());
+ if (progress_reporter)
danakj 2016/10/05 01:53:48 same same
ericrk 2016/10/05 18:07:31 removed
+ progress_reporter->ReportProgress();
+ }
for (int ii = 0; ii < kNumDefaultTextures; ++ii) {
default_textures_[ii] = NULL;
+ if (progress_reporter)
danakj 2016/10/05 01:53:48 ame
ericrk 2016/10/05 18:07:31 emoved
+ progress_reporter->ReportProgress();
}
if (have_context) {

Powered by Google App Engine
This is Rietveld 408576698