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

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

Issue 2795963002: cc: Reduce surface contents scale adjustments. (Closed)
Patch Set: apply scale for copy requests Created 3 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
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 scoped_refptr<FakePictureLayer> root_; 590 scoped_refptr<FakePictureLayer> root_;
591 scoped_refptr<FakePictureLayer> parent_layer_; 591 scoped_refptr<FakePictureLayer> parent_layer_;
592 scoped_refptr<FakePictureLayer> copy_layer_; 592 scoped_refptr<FakePictureLayer> copy_layer_;
593 }; 593 };
594 594
595 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostCopyRequestTestClippedOut); 595 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostCopyRequestTestClippedOut);
596 596
597 class LayerTreeHostCopyRequestTestScaledLayer 597 class LayerTreeHostCopyRequestTestScaledLayer
598 : public LayerTreeHostCopyRequestTest { 598 : public LayerTreeHostCopyRequestTest {
599 protected: 599 protected:
600 void InitializeSettings(LayerTreeSettings* settings) override {
601 settings->layer_transforms_should_scale_layer_contents = true;
602 }
603
600 void SetupTree() override { 604 void SetupTree() override {
601 root_ = Layer::Create(); 605 root_ = Layer::Create();
602 root_->SetBounds(gfx::Size(20, 20)); 606 root_->SetBounds(gfx::Size(20, 20));
603 607
604 gfx::Transform scale; 608 gfx::Transform scale;
605 scale.Scale(2, 2); 609 scale.Scale(2, 2);
606 610
607 copy_layer_ = Layer::Create(); 611 copy_layer_ = Layer::Create();
608 copy_layer_->SetBounds(gfx::Size(10, 10)); 612 copy_layer_->SetBounds(gfx::Size(10, 10));
609 copy_layer_->SetTransform(scale); 613 copy_layer_->SetTransform(scale);
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 int num_draws_; 1309 int num_draws_;
1306 bool copy_happened_; 1310 bool copy_happened_;
1307 bool draw_happened_; 1311 bool draw_happened_;
1308 }; 1312 };
1309 1313
1310 SINGLE_AND_MULTI_THREAD_TEST_F( 1314 SINGLE_AND_MULTI_THREAD_TEST_F(
1311 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); 1315 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest);
1312 1316
1313 } // namespace 1317 } // namespace
1314 } // namespace cc 1318 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698