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

Unified Diff: content/gpu/gpu_child_thread.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/gpu/gpu_child_thread.h
diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h
index 7cbe0fa6f1c781b72c6607fea76cb8c73333dc24..8a9459bad9b175d1748930b41d6611edea53f63c 100644
--- a/content/gpu/gpu_child_thread.h
+++ b/content/gpu/gpu_child_thread.h
@@ -23,6 +23,7 @@
#include "content/common/gpu/gpu_config.h"
#include "content/common/gpu/x_util.h"
#include "content/common/process_control.mojom.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/config/gpu_info.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/public/cpp/bindings/interface_request.h"
@@ -50,14 +51,16 @@ class GpuChildThread : public ChildThreadImpl,
public:
typedef std::queue<IPC::Message*> DeferredMessages;
- GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread,
+ GpuChildThread(const gpu::GpuPreferences* gpu_preferences,
boliu 2016/02/26 22:17:32 these should be const&
Peng 2016/02/29 16:09:22 pointer is necessary, so the caller can use a null
boliu 2016/02/29 16:26:40 Then maybe you want another constructor instead.
Peng 2016/02/29 19:29:50 Do we really need another constructor with duplica
boliu 2016/02/29 19:48:22 Just a general preference to not have parameters t
Peng 2016/02/29 20:30:50 I do agree it is better to avoid using const point
boliu 2016/02/29 20:40:07 content/gpu then? You can just expose that as a st
Peng 2016/02/29 21:18:29 Done.
+ GpuWatchdogThread* gpu_watchdog_thread,
bool dead_on_arrival,
const gpu::GPUInfo& gpu_info,
const DeferredMessages& deferred_messages,
GpuMemoryBufferFactory* gpu_memory_buffer_factory,
gpu::SyncPointManager* sync_point_manager);
- GpuChildThread(const InProcessChildThreadParams& params,
+ GpuChildThread(const gpu::GpuPreferences* gpu_preferences,
+ const InProcessChildThreadParams& params,
GpuMemoryBufferFactory* gpu_memory_buffer_factory,
gpu::SyncPointManager* sync_point_manager);
@@ -68,12 +71,12 @@ class GpuChildThread : public ChildThreadImpl,
void Init(const base::Time& process_start_time);
void StopWatchdog();
+ private:
// ChildThread overrides.
bool Send(IPC::Message* msg) override;
bool OnControlMessageReceived(const IPC::Message& msg) override;
bool OnMessageReceived(const IPC::Message& msg) override;
- private:
// GpuChannelManagerDelegate implementation.
void AddSubscription(int32_t client_id, unsigned int target) override;
void ChannelEstablished(const IPC::ChannelHandle& channel_handle) override;
@@ -131,6 +134,8 @@ class GpuChildThread : public ChildThreadImpl,
void BindProcessControlRequest(
mojo::InterfaceRequest<ProcessControl> request);
+ gpu::GpuPreferences gpu_preferences_;
+
// Set this flag to true if a fatal error occurred before we receive the
// OnInitialize message, in which case we just declare ourselves DOA.
bool dead_on_arrival_;

Powered by Google App Engine
This is Rietveld 408576698