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

Unified Diff: content/gpu/gpu_child_thread.h

Issue 1859403002: Avoid GpuPreferences exposed in content public gpu interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address jam's comments Created 4 years, 8 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
« no previous file with comments | « no previous file | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698