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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 672283003: cc: ReadyToDraw notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Match trace event formatting with existing code Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void SetMaxSwapsPendingOnImplThread(int max) override {} 123 void SetMaxSwapsPendingOnImplThread(int max) override {}
124 void DidSwapBuffersOnImplThread() override {} 124 void DidSwapBuffersOnImplThread() override {}
125 void DidSwapBuffersCompleteOnImplThread() override {} 125 void DidSwapBuffersCompleteOnImplThread() override {}
126 void OnCanDrawStateChanged(bool can_draw) override { 126 void OnCanDrawStateChanged(bool can_draw) override {
127 on_can_draw_state_changed_called_ = true; 127 on_can_draw_state_changed_called_ = true;
128 } 128 }
129 void NotifyReadyToActivate() override { 129 void NotifyReadyToActivate() override {
130 did_notify_ready_to_activate_ = true; 130 did_notify_ready_to_activate_ = true;
131 host_impl_->ActivateSyncTree(); 131 host_impl_->ActivateSyncTree();
132 } 132 }
133 void NotifyReadyToDraw() override {}
133 void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; } 134 void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; }
134 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override { 135 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override {
135 did_request_redraw_ = true; 136 did_request_redraw_ = true;
136 } 137 }
137 void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; } 138 void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; }
138 void SetNeedsManageTilesOnImplThread() override { 139 void SetNeedsManageTilesOnImplThread() override {
139 did_request_manage_tiles_ = true; 140 did_request_manage_tiles_ = true;
140 } 141 }
141 void DidInitializeVisibleTileOnImplThread() override { 142 void DidInitializeVisibleTileOnImplThread() override {
142 did_upload_visible_tile_ = true; 143 did_upload_visible_tile_ = true;
(...skipping 7404 matching lines...) Expand 10 before | Expand all | Expand 10 after
7547 // surface. 7548 // surface.
7548 EXPECT_EQ(0, num_lost_surfaces_); 7549 EXPECT_EQ(0, num_lost_surfaces_);
7549 host_impl_->DidLoseOutputSurface(); 7550 host_impl_->DidLoseOutputSurface();
7550 EXPECT_EQ(1, num_lost_surfaces_); 7551 EXPECT_EQ(1, num_lost_surfaces_);
7551 host_impl_->DidLoseOutputSurface(); 7552 host_impl_->DidLoseOutputSurface();
7552 EXPECT_LE(1, num_lost_surfaces_); 7553 EXPECT_LE(1, num_lost_surfaces_);
7553 } 7554 }
7554 7555
7555 } // namespace 7556 } // namespace
7556 } // namespace cc 7557 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698