summaryrefslogtreecommitdiffstats
path: root/gpu/gles2_conform_support
diff options
context:
space:
mode:
authorpenghuang <penghuang@chromium.org>2016-02-29 15:07:29 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-29 23:09:00 +0000
commit7404df98850f7d6e4bfc0f88faf6629c3ded36e8 (patch)
treed02fbc781f7474f520dfb1fa61672f9da3a97095 /gpu/gles2_conform_support
parent071c61af4d632a6d314a0309791418b2a1fd4126 (diff)
downloadchromium_src-7404df98850f7d6e4bfc0f88faf6629c3ded36e8.zip
chromium_src-7404df98850f7d6e4bfc0f88faf6629c3ded36e8.tar.gz
chromium_src-7404df98850f7d6e4bfc0f88faf6629c3ded36e8.tar.bz2
Use GpuPreferences to avoid directly accessing switches in gpu related code
BUG=586369 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel Review URL: https://codereview.chromium.org/1716813002 Cr-Commit-Position: refs/heads/master@{#378305}
Diffstat (limited to 'gpu/gles2_conform_support')
-rw-r--r--gpu/gles2_conform_support/egl/display.cc3
-rw-r--r--gpu/gles2_conform_support/egl/display.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index 4b010f2..644531f 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -166,7 +166,8 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config,
return NULL;
scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup(
- NULL, NULL, new gpu::gles2::ShaderTranslatorCache,
+ gpu_preferences_, NULL, NULL,
+ new gpu::gles2::ShaderTranslatorCache(gpu_preferences_),
new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true));
decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
diff --git a/gpu/gles2_conform_support/egl/display.h b/gpu/gles2_conform_support/egl/display.h
index 292d68b..6bde633 100644
--- a/gpu/gles2_conform_support/egl/display.h
+++ b/gpu/gles2_conform_support/egl/display.h
@@ -15,6 +15,7 @@
#include "gpu/command_buffer/client/gpu_control.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/command_buffer/service/gpu_scheduler.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/gl_context.h"
@@ -105,6 +106,7 @@ class Display : private gpu::GpuControl {
private:
EGLNativeDisplayType display_id_;
+ gpu::GpuPreferences gpu_preferences_;
bool is_initialized_;
bool create_offscreen_;