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

Unified Diff: content/renderer/render_widget.cc

Issue 6879076: Prepare PepperWidget and RenderWidget for WebKit threaded compositing changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor tweaks Created 9 years, 7 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 | « no previous file | content/renderer/render_widget_fullscreen_pepper.cc » ('j') | 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 aad4b22aca0f6276327e84341c6239ebba6b49ca..2dbd33197be6c8553f581c388dd9f9a07e473adf 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -320,7 +320,11 @@ void RenderWidget::OnWasRestored(bool needs_repainting) {
if (!is_accelerated_compositing_active_) {
didInvalidateRect(gfx::Rect(size_.width(), size_.height()));
} else {
+#ifndef WTF_USE_THREADED_COMPOSITING
+ webwidget_->composite(false);
+#else
scheduleComposite();
+#endif
}
}
@@ -613,7 +617,11 @@ void RenderWidget::AnimateIfNeeded() {
// See crbug.com/71735.
// TODO(jamesr) Remove this call once crbug.com/72007 is fixed.
RenderThread::current()->GetWebKitClientImpl()->DoTimeout();
+#ifdef WEBWIDGET_HAS_ANIMATE_CHANGES
+ webwidget_->animate(0.0);
+#else
webwidget_->animate();
+#endif
return;
}
if (animation_task_posted_)
@@ -867,6 +875,9 @@ void RenderWidget::didActivateAcceleratedCompositing(bool active) {
}
void RenderWidget::scheduleComposite() {
+#if WTF_USE_THREADED_COMPOSITING
+ NOTREACHED();
+#else
// 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
@@ -874,6 +885,7 @@ void RenderWidget::scheduleComposite() {
// duplicating all that code is less desirable than "faking out" the
// invalidation path using a magical damage rect.
didInvalidateRect(WebRect(0, 0, 1, 1));
+#endif
}
void RenderWidget::scheduleAnimation() {
@@ -1136,7 +1148,13 @@ void RenderWidget::OnMsgRepaint(const gfx::Size& size_to_paint) {
set_next_paint_is_repaint_ack();
if (is_accelerated_compositing_active_) {
+#ifndef WTF_USE_THREADED_COMPOSITING
scheduleComposite();
+#else
+#ifdef WEBWIDGET_HAS_THREADED_COMPOSITING_CHANGES
+ webwidget_->composite(false);
+#endif
+#endif
} else {
gfx::Rect repaint_rect(size_to_paint.width(), size_to_paint.height());
didInvalidateRect(repaint_rect);
« no previous file with comments | « no previous file | content/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698