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

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

Issue 647253002: cc: Stop converting update rect from int to float to int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displayrectint: ccperftests Created 6 years, 2 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_damage.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } 1350 virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
1351 1351
1352 virtual void DidCommitAndDrawFrame() override { 1352 virtual void DidCommitAndDrawFrame() override {
1353 switch (layer_tree_host()->source_frame_number()) { 1353 switch (layer_tree_host()->source_frame_number()) {
1354 case 1: 1354 case 1:
1355 parent_->SetNeedsDisplay(); 1355 parent_->SetNeedsDisplay();
1356 child_->SetNeedsDisplay(); 1356 child_->SetNeedsDisplay();
1357 break; 1357 break;
1358 case 2: 1358 case 2:
1359 // Damage part of layers. 1359 // Damage part of layers.
1360 parent_->SetNeedsDisplayRect(gfx::RectF(0.f, 0.f, 5.f, 5.f)); 1360 parent_->SetNeedsDisplayRect(gfx::Rect(5, 5));
1361 child_->SetNeedsDisplayRect(gfx::RectF(0.f, 0.f, 5.f, 5.f)); 1361 child_->SetNeedsDisplayRect(gfx::Rect(5, 5));
1362 break; 1362 break;
1363 case 3: 1363 case 3:
1364 child_->SetNeedsDisplay(); 1364 child_->SetNeedsDisplay();
1365 layer_tree_host()->SetViewportSize(gfx::Size(10, 10)); 1365 layer_tree_host()->SetViewportSize(gfx::Size(10, 10));
1366 break; 1366 break;
1367 case 4: 1367 case 4:
1368 layer_tree_host()->SetViewportSize(gfx::Size(10, 20)); 1368 layer_tree_host()->SetViewportSize(gfx::Size(10, 20));
1369 break; 1369 break;
1370 case 5: 1370 case 5:
1371 EndTest(); 1371 EndTest();
(...skipping 3788 matching lines...) Expand 10 before | Expand all | Expand 10 after
5160 } 5160 }
5161 5161
5162 int commit_count_; 5162 int commit_count_;
5163 TestSwapPromiseResult swap_promise_result_[3]; 5163 TestSwapPromiseResult swap_promise_result_[3];
5164 }; 5164 };
5165 5165
5166 // Impl-side painting is not supported for synchronous compositing. 5166 // Impl-side painting is not supported for synchronous compositing.
5167 SINGLE_THREAD_NOIMPL_TEST_F(LayerTreeHostTestSynchronousCompositeSwapPromise); 5167 SINGLE_THREAD_NOIMPL_TEST_F(LayerTreeHostTestSynchronousCompositeSwapPromise);
5168 5168
5169 } // namespace cc 5169 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_damage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698