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

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

Issue 2378583003: Ping watchdog thread during GpuChannel destruction (Closed)
Patch Set: revert to passing via destructor 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..aab98e0298387355b09807d26cf2678233fea3ee 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,18 @@ TextureManager::~TextureManager() {
this);
}
-void TextureManager::Destroy(bool have_context) {
+void TextureManager::Destroy(bool have_context,
+ ProgressReporter* progress_reporter) {
+ DCHECK(progress_reporter);
have_context_ = have_context;
- textures_.clear();
+
+ while (!textures_.empty()) {
+ textures_.erase(textures_.begin());
+ progress_reporter->ReportProgress();
+ }
for (int ii = 0; ii < kNumDefaultTextures; ++ii) {
default_textures_[ii] = NULL;
+ progress_reporter->ReportProgress();
}
if (have_context) {

Powered by Google App Engine
This is Rietveld 408576698