summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/gpu_channel_host.h
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-07 20:45:01 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-07 20:45:01 +0000
commit4bce24e4288130d9436863d1db3ee0295ed93277 (patch)
tree41b08178a03d6233ada409e877c5160ebabc189c /chrome/renderer/gpu_channel_host.h
parent1fc82d9171749533e7028a21c1649697499f6056 (diff)
downloadchromium_src-4bce24e4288130d9436863d1db3ee0295ed93277.zip
chromium_src-4bce24e4288130d9436863d1db3ee0295ed93277.tar.gz
chromium_src-4bce24e4288130d9436863d1db3ee0295ed93277.tar.bz2
Added GPU stat for whether a GPU can report context lost.
On Windows it checks to see if the IDirect3D9 object supports Vista and later features (meaning it won't routinely report lost contexts). On Linux and Mac we can just check if its EGL versus some other GL that doesn't report lost contexts. I routed the stats to the renderer process so webkit code can query whether lost contexts are likely. I didn't wire up breakpad yet. TEST=try BUG=52318 Review URL: http://codereview.chromium.org/3149016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/gpu_channel_host.h')
-rw-r--r--chrome/renderer/gpu_channel_host.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/renderer/gpu_channel_host.h b/chrome/renderer/gpu_channel_host.h
index e35d40d..4df29a4 100644
--- a/chrome/renderer/gpu_channel_host.h
+++ b/chrome/renderer/gpu_channel_host.h
@@ -10,6 +10,7 @@
#include "base/hash_tables.h"
#include "base/scoped_ptr.h"
+#include "chrome/common/gpu_info.h"
#include "chrome/common/message_router.h"
#include "gfx/native_widget_types.h"
#include "gfx/size.h"
@@ -44,6 +45,10 @@ class GpuChannelHost : public IPC::Channel::Listener,
State state() const { return state_; }
+ // The GPU stats reported by the GPU process.
+ void set_gpu_info(const GPUInfo& gpu_info);
+ const GPUInfo& gpu_info() const;
+
// IPC::Channel::Listener implementation:
virtual void OnMessageReceived(const IPC::Message& msg);
virtual void OnChannelConnected(int32 peer_pid);
@@ -67,6 +72,8 @@ class GpuChannelHost : public IPC::Channel::Listener,
private:
State state_;
+ GPUInfo gpu_info_;
+
scoped_ptr<IPC::SyncChannel> channel_;
// Used to implement message routing functionality to CommandBufferProxy