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

Unified Diff: cc/trees/proxy_impl.cc

Issue 2317493003: cc: Toward merging DrawFrame and SwapBuffers in DelegatingRenderer. (Closed)
Patch Set: merge-draw-swap: add-draw-result-checks 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy_impl.cc
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index 80adffbe0697a61a90e1932ea0fb8b0515dd947e..c89d6c235106d4689c187616a07e5a7f92906cb6 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -601,20 +601,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;
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698