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

Unified Diff: gpu/gles2_conform_support/egl/display.h

Issue 1716813002: Use GpuPreferences to avoid directly accessing switches in gpu related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 10 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/gles2_conform_support/egl/display.h
diff --git a/gpu/gles2_conform_support/egl/display.h b/gpu/gles2_conform_support/egl/display.h
index 619fed9f10d5864f8f7791af9d69300df696f12c..02f1330fbbb89a4a969c4255cef749ab2924216b 100644
--- a/gpu/gles2_conform_support/egl/display.h
+++ b/gpu/gles2_conform_support/egl/display.h
@@ -15,6 +15,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
namespace egl {
@@ -73,6 +74,9 @@ class Display {
EGLBoolean ReleaseCurrent(ThreadState*);
EGLBoolean MakeCurrent(ThreadState*, EGLSurface, EGLSurface, EGLContext);
+ const gpu::GpuPreferences& gpu_preferences() const {
+ return gpu_preferences_;
+ }
uint64_t GenerateFenceSyncRelease();
bool IsFenceSyncRelease(uint64_t release);
bool IsFenceSyncFlushed(uint64_t release);
@@ -85,6 +89,7 @@ class Display {
Context* GetContext(EGLContext);
base::Lock lock_;
+ gpu::GpuPreferences gpu_preferences_;
bool is_initialized_;
uint64_t next_fence_sync_release_;
std::vector<scoped_refptr<Surface>> surfaces_;
« gpu/command_buffer/service/gles2_cmd_decoder.cc ('K') | « gpu/gles2_conform_support/egl/context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698