Chromium Code Reviews| 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 9b6fad2ce2d7afee87fc901d37eeca31ee012887..99d1fee45b7c793307f95e9ee76ecb8806febd58 100644 |
| --- a/gpu/command_buffer/service/shader_manager.h |
| +++ b/gpu/command_buffer/service/shader_manager.h |
| @@ -63,6 +63,8 @@ class GPU_EXPORT ShaderManager { |
| bool valid, const char* log, |
| ShaderTranslatorInterface* translator); |
| + void SetPendingCompilation(bool pending_cache_miss_compilation); |
|
greggman
2012/06/26 23:00:27
style: if this is just a simple setter it's named
dmurph
2012/07/04 00:01:29
Done.
|
| + |
| const VariableInfo* GetAttribInfo(const std::string& name) const; |
| const VariableInfo* GetUniformInfo(const std::string& name) const; |
| @@ -87,6 +89,32 @@ class GPU_EXPORT ShaderManager { |
| return use_count_ != 0; |
| } |
| + bool IsPendingCacheMissCompilation() const { |
| + return pending_cache_miss_compilation_; |
| + } |
| + |
| + // Used by shader cache. |
| + const ShaderTranslator::VariableMap& attrib_map() const { |
| + return attrib_map_; |
| + } |
| + |
| + // Used by shader cache. |
| + const ShaderTranslator::VariableMap& uniform_map() const { |
| + return uniform_map_; |
| + } |
| + |
| + // Used by shader cache. |
| + void SetAttribMap(const ShaderTranslator::VariableMap& attrib_map) { |
| + // copied because cache might be cleared |
| + attrib_map_ = ShaderTranslator::VariableMap(attrib_map); |
| + } |
| + |
| + // Used by shader cache. |
| + void SetUniformMap(const ShaderTranslator::VariableMap& uniform_map) { |
| + // copied because cache might be cleared |
| + uniform_map_ = ShaderTranslator::VariableMap(uniform_map); |
| + } |
| + |
| private: |
| typedef ShaderTranslator::VariableMap VariableMap; |
| @@ -122,6 +150,9 @@ class GPU_EXPORT ShaderManager { |
| // The type info when the shader was last compiled. |
| VariableMap attrib_map_; |
| VariableMap uniform_map_; |
| + |
| + // If compilation was delayed for possible cache hit |
| + bool pending_cache_miss_compilation_; |
| }; |
| ShaderManager(); |