// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ #define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ #include <string.h> #include <map> #include "base/memory/ref_counted.h" #include "gpu/command_buffer/service/shader_translator.h" #include "gpu/config/gpu_preferences.h" #include "third_party/angle/include/GLSLANG/ShaderLang.h" namespace gpu { struct GpuPreferences; namespace gles2 { // This class is not thread safe and can only be created and destroyed // on a single thread. But it is safe to use two independent instances on two // threads without synchronization. // // TODO(backer): Investigate using glReleaseShaderCompiler as an alternative to // to this cache. class GPU_GLES2_EXPORT ShaderTranslatorCache : public ShaderTranslator::DestructionObserver { … }; } // namespace gles2 } // namespace gpu #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_