summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_view_impl.h
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-04 18:12:16 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-04 18:12:16 +0000
commit29ed96a41ff00d068e470c540fb9222f27239bc9 (patch)
treefe804f76d15a284d0a4a1f60aa7206cfc1d0eb21 /content/renderer/render_view_impl.h
parentcce3ab7135c7ace74e0c20caabc4f05e33e44085 (diff)
downloadchromium_src-29ed96a41ff00d068e470c540fb9222f27239bc9.zip
chromium_src-29ed96a41ff00d068e470c540fb9222f27239bc9.tar.gz
chromium_src-29ed96a41ff00d068e470c540fb9222f27239bc9.tar.bz2
Provide WillInitiatePaint() as well as DidInitiatePaint() and tweak semantics.
WillInitiatePaint() informs derived classes when the RenderWidget is about to perform a paint operation. DidInitiatePaint() informs derived classes that the RenderWidget has finished the paint operation and sent it to the browser to display. DidFlushPaint() informs derived classes when the paint operation has actually been displayed (either in response to UpdateRectAck, or OnSwapBuffersComplete()). Pepper Graphics2D uses WillInitiatePaint and DidFlushPaint to trigger its Flush callback only for flushes occurring after the paint has actually been initiated. Pepper Graphics3D uses DidInitiatePaint to know when the 3D pipeline is done with buffers from the previous paint operation, so that new content rendered to them won't be prematurely flushed to the screen. Known issues with this CL: * There is still scope for the Graphics2D to get confused when threaded compositing is in use, since DidFlushPaint for an older paint may be received after WillInitiatePaint for a more recent one, but that is a fix for another CL. * Graphics3D will now be notified earlier in than it would have been in the software case, since it previously hooked DidFlushPaint. BUG=111639 TEST=Run Native Client Examples "Pi generator", "Tumbler" and "Fullscreen Tumbler" with and without --force-composite-mode and verify they update correctly. Review URL: http://codereview.chromium.org/9328016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_view_impl.h')
-rw-r--r--content/renderer/render_view_impl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 1d9963a..6c60ae3 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -623,7 +623,6 @@ class RenderViewImpl : public RenderWidget,
// Please do not add your stuff randomly to the end here. If there is an
// appropriate section, add it there. If not, there are some random functions
// nearer to the top you can add it to.
- virtual void DidFlushPaint() OVERRIDE;
// Cannot use std::set unfortunately since linked_ptr<> does not support
// operator<.
@@ -636,7 +635,9 @@ class RenderViewImpl : public RenderWidget,
virtual void OnResize(const gfx::Size& new_size,
const gfx::Rect& resizer_rect,
bool is_fullscreen) OVERRIDE;
+ virtual void WillInitiatePaint() OVERRIDE;
virtual void DidInitiatePaint() OVERRIDE;
+ virtual void DidFlushPaint() OVERRIDE;
virtual webkit::ppapi::PluginInstance* GetBitmapForOptimizedPluginPaint(
const gfx::Rect& paint_bounds,
TransportDIB** dib,