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

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

Issue 2378583003: Ping watchdog thread during GpuChannel destruction (Closed)
Patch Set: Fix lifetime and use nullptr 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/shader_manager.cc
diff --git a/gpu/command_buffer/service/shader_manager.cc b/gpu/command_buffer/service/shader_manager.cc
index 94ffe42ce4de5a2d82a0d367b8a191734bcd9fb3..38f371764a71905d1f306c6c9268c6e32927b877 100644
--- a/gpu/command_buffer/service/shader_manager.cc
+++ b/gpu/command_buffer/service/shader_manager.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
+#include "gpu/command_buffer/service/progress_reporter.h"
namespace gpu {
namespace gles2 {
@@ -267,7 +268,8 @@ const sh::OutputVariable* Shader::GetOutputVariableInfo(
return nullptr;
}
-ShaderManager::ShaderManager() {}
+ShaderManager::ShaderManager(ProgressReporter* progress_reporter)
+ : progress_reporter_(progress_reporter) {}
ShaderManager::~ShaderManager() {
DCHECK(shaders_.empty());
@@ -280,6 +282,8 @@ void ShaderManager::Destroy(bool have_context) {
shader->Destroy();
}
shaders_.erase(shaders_.begin());
+ if (progress_reporter_)
+ progress_reporter_->ReportProgress();
}
}

Powered by Google App Engine
This is Rietveld 408576698