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

Unified Diff: content/renderer/render_widget.cc

Issue 16561010: Fix swapbuffers accounting in single-threaded mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | 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 11ffaca56e691c49ff0a37d63b028890770added..ccebd13e0e77075e85618009715eb246ca95ef6d 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1116,9 +1116,6 @@ void RenderWidget::DoDeferredUpdate() {
return;
}
- if (is_accelerated_compositing_active_)
- using_asynchronous_swapbuffers_ = SupportsAsynchronousSwapBuffers();
-
// Tracking of frame rate jitter
base::TimeTicks frame_begin_ticks = base::TimeTicks::Now();
InstrumentWillBeginFrame();
@@ -1129,6 +1126,11 @@ void RenderWidget::DoDeferredUpdate() {
// GpuRenderingActivated message.
webwidget_->layout();
+ // Check for whether we need to track swap buffers. We need to do that after
+ // layout() because it may have switched us to accelerated compositing.
+ if (is_accelerated_compositing_active_)
+ using_asynchronous_swapbuffers_ = SupportsAsynchronousSwapBuffers();
+
// The following two can result in further layout and possibly
// enable GPU acceleration so they need to be called before any painting
// is done.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698