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

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

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.h
diff --git a/gpu/command_buffer/service/shader_manager.h b/gpu/command_buffer/service/shader_manager.h
index 2e828e66f1efdd6bbf7ab0314055ff867fa36825..29d50660a24235090a92d19b8e73d0ebccd03a95 100644
--- a/gpu/command_buffer/service/shader_manager.h
+++ b/gpu/command_buffer/service/shader_manager.h
@@ -18,6 +18,8 @@
namespace gpu {
namespace gles2 {
+class ProgressReporter;
+
enum ShaderVariableBaseType {
SHADER_VARIABLE_INT = 0x01,
SHADER_VARIABLE_UINT = 0x02,
@@ -268,7 +270,7 @@ class GPU_EXPORT Shader : public base::RefCounted<Shader> {
// need to be shared by multiple GLES2Decoders.
class GPU_EXPORT ShaderManager {
public:
- ShaderManager();
+ ShaderManager(ProgressReporter* progress_reporter);
~ShaderManager();
// Must call before destruction.
@@ -308,6 +310,11 @@ class GPU_EXPORT ShaderManager {
void RemoveShader(Shader* shader);
+ // Used to notify the watchdog thread of progress during destruction,
+ // preventing time-outs when destruction takes a long time. May be null when
+ // using in-process command buffer.
+ ProgressReporter* progress_reporter_;
+
DISALLOW_COPY_AND_ASSIGN(ShaderManager);
};

Powered by Google App Engine
This is Rietveld 408576698