Index: gpu/command_buffer/service/shader_translator_cache.cc |
diff --git a/gpu/command_buffer/service/shader_translator_cache.cc b/gpu/command_buffer/service/shader_translator_cache.cc |
index f78039fcac25d72c900bc2360ceb668fe669abb2..9c04f60adf89f7a3d13b7eb79a1e69b6e9cb524e 100644 |
--- a/gpu/command_buffer/service/shader_translator_cache.cc |
+++ b/gpu/command_buffer/service/shader_translator_cache.cc |
@@ -2,14 +2,18 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "gpu/command_buffer/service/shader_translator_cache.h" |
+ |
#include <GLES2/gl2.h> |
-#include "gpu/command_buffer/service/shader_translator_cache.h" |
+#include "gpu/command_buffer/service/gpu_preferences.h" |
namespace gpu { |
namespace gles2 { |
-ShaderTranslatorCache::ShaderTranslatorCache() { |
+ShaderTranslatorCache::ShaderTranslatorCache( |
+ const GpuPreferences& gpu_preferences) |
+ : gpu_preferences_(gpu_preferences) { |
} |
ShaderTranslatorCache::~ShaderTranslatorCache() { |
@@ -43,7 +47,8 @@ scoped_refptr<ShaderTranslator> ShaderTranslatorCache::GetTranslator( |
ShaderTranslator* translator = new ShaderTranslator(); |
if (translator->Init(shader_type, shader_spec, resources, |
- shader_output_language, driver_bug_workarounds)) { |
+ shader_output_language, driver_bug_workarounds, |
+ gpu_preferences_.gl_shader_interm_output)) { |
cache_[params] = translator; |
translator->AddDestructionObserver(this); |
return translator; |