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

Unified Diff: content/common/gpu/gpu_channel_manager.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: content/common/gpu/gpu_channel_manager.h
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index e76b373bb3c981965d65885c61d9dbf592772f8d..f15ee3a59123bdeacb3d6516dd94cf86cf9d7060 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -36,6 +36,7 @@ class GLShareGroup;
}
namespace gpu {
+struct GpuPreferences;
class PreemptionFlag;
class SyncPointClient;
class SyncPointManager;
@@ -69,7 +70,8 @@ struct BufferPresentedParams;
// browser process to them based on the corresponding renderer ID.
class CONTENT_EXPORT GpuChannelManager {
public:
- GpuChannelManager(GpuChannelManagerDelegate* delegate,
+ GpuChannelManager(const gpu::GpuPreferences& gpu_preferences,
+ GpuChannelManagerDelegate* delegate,
GpuWatchdog* watchdog,
base::SingleThreadTaskRunner* task_runner,
base::SingleThreadTaskRunner* io_task_runner,
@@ -106,6 +108,9 @@ class CONTENT_EXPORT GpuChannelManager {
void BufferPresented(const BufferPresentedParams& params);
#endif
+ const gpu::GpuPreferences& gpu_preferences() const {
+ return gpu_preferences_;
+ }
gpu::gles2::ProgramCache* program_cache();
gpu::gles2::ShaderTranslatorCache* shader_translator_cache();
gpu::gles2::FramebufferCompletenessCache* framebuffer_completeness_cache();
@@ -169,6 +174,8 @@ class CONTENT_EXPORT GpuChannelManager {
void DoWakeUpGpu();
#endif
+ const gpu::GpuPreferences& gpu_preferences_;
+
GpuChannelManagerDelegate* const delegate_;
#if defined(OS_MACOSX)
IDMap<ImageTransportHelper> image_transport_map_;

Powered by Google App Engine
This is Rietveld 408576698