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

Unified Diff: content/renderer/render_thread_impl.h

Issue 9270025: Remove renderer dependencies from the GPU client classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add overrides Created 8 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/renderer/render_thread_impl.h
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index b0501bd95a1c396bf1824b3820bdfa9a21db76ed..b69bea39ede35dd7ada293cbe1d300c7a3de30b8 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -14,11 +14,13 @@
#include "base/time.h"
#include "base/timer.h"
#include "build/build_config.h"
+#include "content/common/child_process.h"
#include "content/common/child_thread.h"
#include "content/common/content_export.h"
#include "content/common/css_colors.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/public/renderer/render_thread.h"
+#include "content/renderer/gpu/gpu_channel_host.h"
#include "ipc/ipc_channel_proxy.h"
#include "ui/gfx/native_widget_types.h"
@@ -67,7 +69,8 @@ class Extension;
// routed to the RenderThread according to the routing IDs of the messages.
// The routing IDs correspond to RenderView instances.
class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread,
- public ChildThread {
+ public ChildThread,
+ public GpuChannelHostFactory {
public:
static RenderThreadImpl* current();
@@ -118,6 +121,26 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread,
virtual void ReleaseCachedFonts() OVERRIDE;
#endif
+ // GpuChannelHostFactory implementation:
+ virtual bool IsMainThread() OVERRIDE;
+ virtual bool IsIOThread() OVERRIDE;
+ virtual MessageLoop* GetMainLoop() OVERRIDE;
+ virtual base::MessageLoopProxy* GetIOLoopProxy() OVERRIDE;
+ virtual base::WaitableEvent* GetShutDownEvent() OVERRIDE;
+ virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(
+ uint32 size) OVERRIDE;
+ virtual int32 CreateViewCommandBuffer(
+ int32 surface_id,
+ const GPUCreateCommandBufferConfig& init_params) OVERRIDE;
+
+ // Synchronously establish a channel to the GPU plugin if not previously
+ // established or if it has been lost (for example if the GPU plugin crashed).
+ // If there is a pending asynchronous request, it will be completed by the
+ // time this routine returns.
+ virtual GpuChannelHost* EstablishGpuChannelSync(
+ content::CauseForGpuLaunch) OVERRIDE;
+
+
// These methods modify how the next message is sent. Normally, when sending
// a synchronous message that runs a nested message loop, we need to suspend
// callbacks into WebKit. This involves disabling timers and deferring
@@ -149,12 +172,6 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread,
bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; }
- // Synchronously establish a channel to the GPU plugin if not previously
- // established or if it has been lost (for example if the GPU plugin crashed).
- // If there is a pending asynchronous request, it will be completed by the
- // time this routine returns.
- GpuChannelHost* EstablishGpuChannelSync(content::CauseForGpuLaunch);
-
// Get the GPU channel. Returns NULL if the channel is not established or
// has been lost.
GpuChannelHost* GetGpuChannel();
« no previous file with comments | « content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698