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

Unified Diff: cc/trees/proxy_impl.cc

Issue 2317493003: cc: Toward merging DrawFrame and SwapBuffers in DelegatingRenderer. (Closed)
Patch Set: merge-draw-swap Created 4 years, 3 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
Index: cc/trees/proxy_impl.cc
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index 3a6f2db319847a10c0e1d43e28c366f80a0bb220..74b052c76c1baf1e0dceb92eb379e5bf0876059c 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -614,20 +614,18 @@ DrawResult ProxyImpl::DrawAndSwapInternal(bool forced_draw) {
if (draw_frame) {
layer_tree_host_impl_->DrawLayers(&frame);
+ if (layer_tree_host_impl_->SwapBuffers(frame))
+ scheduler_->DidSwapBuffers();
result = DRAW_SUCCESS;
} else {
DCHECK_NE(DRAW_SUCCESS, result);
}
+
layer_tree_host_impl_->DidDrawAllLayers(frame);
bool start_ready_animations = draw_frame;
layer_tree_host_impl_->UpdateAnimationState(start_ready_animations);
- if (draw_frame) {
- if (layer_tree_host_impl_->SwapBuffers(frame))
- scheduler_->DidSwapBuffers();
- }
-
// Tell the main thread that the the newly-commited frame was drawn.
if (next_frame_is_newly_committed_frame_) {
next_frame_is_newly_committed_frame_ = false;

Powered by Google App Engine
This is Rietveld 408576698