diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-11 23:43:08 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-11 23:43:08 +0000 |
commit | 37a6f30b693c48d5d855f2f26633078d7947a892 (patch) | |
tree | 12679e8602a314b1e2511723761a53470ddd0692 /content/renderer/render_widget.h | |
parent | 2d8a4eb0fd04bf7733d1db2e4ada3a4aacad46bb (diff) | |
download | chromium_src-37a6f30b693c48d5d855f2f26633078d7947a892.zip chromium_src-37a6f30b693c48d5d855f2f26633078d7947a892.tar.gz chromium_src-37a6f30b693c48d5d855f2f26633078d7947a892.tar.bz2 |
Fix num_swapbuffers_complete_pending_ accounting.
Move the accounting into the context itself, which knows accurately when a swapbuffers is sent.
This fixes issues with the GPU process dying while an active tab is in the background.
BUG=chromium-os:16960
TEST=Go to youtube with Pepper Flash, switch to a different tab, kill GPU process, go to youtube tab, check that it still displays. Do it again twice.
Review URL: http://codereview.chromium.org/7313033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_widget.h')
-rw-r--r-- | content/renderer/render_widget.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index e6c896f8..3bad78a 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h @@ -218,15 +218,17 @@ class RenderWidget : public IPC::Channel::Listener, virtual void DidFlushPaint() {} // Override and return true when the widget is rendered with a graphics - // context that supports asynchronous swapbuffers. When returning true, - // the subclass must call RenderWidget::OnSwapBuffersComplete() when - // swaps complete, and OnSwapBuffersAborted if the context is lost. + // context that supports asynchronous swapbuffers. When returning true, the + // subclass must call OnSwapBuffersPosted() when swap is posted, + // OnSwapBuffersComplete() when swaps complete, and OnSwapBuffersAborted if + // the context is lost. virtual bool SupportsAsynchronousSwapBuffers(); // Notifies scheduler that the RenderWidget's subclass has finished or aborted // a swap buffers. - void OnSwapBuffersAborted(); + void OnSwapBuffersPosted(); void OnSwapBuffersComplete(); + void OnSwapBuffersAborted(); // Detects if a suitable opaque plugin covers the given paint bounds with no // compositing necessary. |