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

Unified Diff: content/renderer/render_widget.cc

Issue 10227004: RenderWidget's scheduleComposite should return a bool. (true iff a prompt composite will come). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index e21aeda4b03bce52228e785255e7a77e5c2dc0b2..6ba68691fddcd60ddcb9b6ec5a502b686b4db9c0 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1161,6 +1161,23 @@ void RenderWidget::didCompleteSwapBuffers() {
next_paint_flags_ = 0;
}
+#if defined(WEBWIDGETCLIENT_SCHEDULECOMPOSITE_RETURNS_BOOL)
+bool RenderWidget::scheduleComposite() {
nduca 2012/05/02 06:53:00 Can you fix this with less code duplication? E.g.
+ if (WebWidgetHandlesCompositorScheduling()) {
+ webwidget_->composite(false);
+ return true;
+ }
+
+ // TODO(nduca): replace with something a little less hacky. The reason this
+ // hack is still used is because the Invalidate-DoDeferredUpdate loop
+ // contains a lot of host-renderer synchronization logic that is still
+ // important for the accelerated compositing case. The option of simply
+ // duplicating all that code is less desirable than "faking out" the
+ // invalidation path using a magical damage rect.
+ didInvalidateRect(WebRect(0, 0, 1, 1));
+ return !is_hidden_;
nduca 2012/05/02 06:53:00 This feels fragile to me. You're assuming things h
+}
+#else
void RenderWidget::scheduleComposite() {
if (WebWidgetHandlesCompositorScheduling()) {
webwidget_->composite(false);
@@ -1174,6 +1191,7 @@ void RenderWidget::scheduleComposite() {
didInvalidateRect(WebRect(0, 0, 1, 1));
}
}
+#endif
void RenderWidget::scheduleAnimation() {
if (animation_update_pending_)
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698