Chromium Code Reviews| 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_) |