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

Unified Diff: chrome/renderer/render_thread.h

Issue 1136006: Calling OpenGL from the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « chrome/renderer/gpu_channel_host.cc ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_thread.h
===================================================================
--- chrome/renderer/render_thread.h (revision 42644)
+++ chrome/renderer/render_thread.h (working copy)
@@ -18,9 +18,11 @@
#include "chrome/common/child_thread.h"
#include "chrome/common/css_colors.h"
#include "chrome/common/dom_storage_common.h"
+#include "chrome/renderer/gpu_channel_host.h"
#include "chrome/renderer/renderer_histogram_snapshots.h"
#include "chrome/renderer/visitedlink_slave.h"
#include "gfx/native_widget_types.h"
+#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_platform_file.h"
class AppCacheDispatcher;
@@ -165,6 +167,15 @@
// Update the list of active extensions that will be reported when we crash.
void UpdateActiveExtensions();
+ // Asynchronously establish a channel to the GPU plugin if not previously
+ // established or if it has been lost (for example if the GPU plugin crashed).
+ // Use GetGpuChannel() to determine when the channel is ready for use.
+ void EstablishGpuChannel();
+
+ // Get the GPU channel. Returns NULL if the channel is not established or
+ // has been lost.
+ GpuChannelHost* GetGpuChannel();
+
private:
virtual void OnControlMessageReceived(const IPC::Message& msg);
@@ -220,6 +231,8 @@
void OnSpellCheckWordAdded(const std::string& word);
void OnSpellCheckEnableAutoSpellCorrect(bool enable);
+ void OnGpuChannelEstablished(const IPC::ChannelHandle& channel_handle);
+
// Gather usage statistics from the in-memory cache and inform our host.
// These functions should be call periodically so that the host can make
// decisions about how to allocation resources using current information.
@@ -288,6 +301,9 @@
// not idle, to ensure that IdleHandle gets called eventually.
base::RepeatingTimer<RenderThread> forced_idle_timer_;
+ // The channel from the renderer process to the GPU process.
+ scoped_refptr<GpuChannelHost> gpu_channel_;
+
DISALLOW_COPY_AND_ASSIGN(RenderThread);
};
« no previous file with comments | « chrome/renderer/gpu_channel_host.cc ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698