Index: content/gpu/gpu_child_thread.h |
diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h |
index e5f518972faf543c123e61f551858ef3594f9e97..ab05e5b2a80c06253106f8cd7f545fb08ae52ec1 100644 |
--- a/content/gpu/gpu_child_thread.h |
+++ b/content/gpu/gpu_child_thread.h |
@@ -56,6 +56,10 @@ class GpuChildThread : public ChildThreadImpl, |
public: |
typedef std::queue<IPC::Message*> DeferredMessages; |
+ // Returns the one gpu thread for this process. Note that this can only |
+ // be accessed when running on the gpu thread itself. |
+ static GpuChildThread* current(); |
+ |
GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread, |
bool dead_on_arrival, |
const gpu::GPUInfo& gpu_info, |
@@ -75,6 +79,8 @@ class GpuChildThread : public ChildThreadImpl, |
void Init(const base::Time& process_start_time); |
void StopWatchdog(); |
+ gpu::GpuPreferences gpu_preferences() { return gpu_preferences_; } |
+ |
private: |
// ChildThread overrides. |
bool Send(IPC::Message* msg) override; |