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

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

Issue 13637017: Delete layout_viewport_size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 7 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "cc/test/fake_content_layer.h" 7 #include "cc/test/fake_content_layer.h"
8 #include "cc/test/fake_content_layer_client.h" 8 #include "cc/test/fake_content_layer_client.h"
9 #include "cc/test/layer_tree_test.h" 9 #include "cc/test/layer_tree_test.h"
10 #include "cc/trees/damage_tracker.h" 10 #include "cc/trees/damage_tracker.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 virtual void DidCommit() OVERRIDE { 76 virtual void DidCommit() OVERRIDE {
77 int next_frame = layer_tree_host()->commit_number(); 77 int next_frame = layer_tree_host()->commit_number();
78 switch (next_frame) { 78 switch (next_frame) {
79 case 1: 79 case 1:
80 layer_tree_host()->SetNeedsCommit(); 80 layer_tree_host()->SetNeedsCommit();
81 break; 81 break;
82 case 2: 82 case 2:
83 // Cause visible damage. 83 // Cause visible damage.
84 content_->SetNeedsDisplayRect( 84 content_->SetNeedsDisplayRect(
85 gfx::Rect(layer_tree_host()->layout_viewport_size())); 85 gfx::Rect(layer_tree_host()->device_viewport_size()));
86 break; 86 break;
87 case 3: 87 case 3:
88 // Cause non-visible damage. 88 // Cause non-visible damage.
89 content_->SetNeedsDisplayRect(gfx::Rect(90, 90, 10, 10)); 89 content_->SetNeedsDisplayRect(gfx::Rect(90, 90, 10, 10));
90 break; 90 break;
91 } 91 }
92 } 92 }
93 93
94 virtual void AfterTest() OVERRIDE { 94 virtual void AfterTest() OVERRIDE {
95 EXPECT_EQ(4, did_swaps_); 95 EXPECT_EQ(4, did_swaps_);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 FakeContentLayerClient client_; 266 FakeContentLayerClient client_;
267 scoped_refptr<FakeContentLayer> root_; 267 scoped_refptr<FakeContentLayer> root_;
268 scoped_refptr<FakeContentLayer> child_; 268 scoped_refptr<FakeContentLayer> child_;
269 gfx::RectF child_damage_rect_; 269 gfx::RectF child_damage_rect_;
270 }; 270 };
271 271
272 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDamageTestForcedFullDamage); 272 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDamageTestForcedFullDamage);
273 273
274 } // namespace 274 } // namespace
275 } // namespace cc 275 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/layer_tree_host_unittest_delegated.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698