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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 324483003: cc: Removed LCD text settings from the impl side. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.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 "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 pending_layer->SetDrawsContent(true); 1641 pending_layer->SetDrawsContent(true);
1642 pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>()); 1642 pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>());
1643 1643
1644 pending_layer_ = static_cast<FakePictureLayerImpl*>( 1644 pending_layer_ = static_cast<FakePictureLayerImpl*>(
1645 host_impl_.pending_tree()->LayerById(id_)); 1645 host_impl_.pending_tree()->LayerById(id_));
1646 1646
1647 // Set some state on the pending layer, make sure it is not clobbered 1647 // Set some state on the pending layer, make sure it is not clobbered
1648 // by a sync from the active layer. This could happen because if the 1648 // by a sync from the active layer. This could happen because if the
1649 // pending layer has not been post-commit initialized it will attempt 1649 // pending layer has not been post-commit initialized it will attempt
1650 // to sync from the active layer. 1650 // to sync from the active layer.
1651 bool default_lcd_text_setting = pending_layer_->is_using_lcd_text(); 1651 // bool default_lcd_text_setting = pending_layer_->is_using_lcd_text();
alokp 2014/06/06 22:37:40 enne: LCD text state is going away. Any suggestion
enne (OOO) 2014/06/09 22:58:39 Looking at SyncFromActiveLayer, maybe one of the r
1652 pending_layer_->force_set_lcd_text(!default_lcd_text_setting); 1652 // pending_layer_->force_set_lcd_text(!default_lcd_text_setting);
1653 EXPECT_TRUE(pending_layer_->needs_post_commit_initialization()); 1653 EXPECT_TRUE(pending_layer_->needs_post_commit_initialization());
1654 1654
1655 host_impl_.ActivatePendingTree(); 1655 host_impl_.ActivatePendingTree();
1656 1656
1657 active_layer_ = static_cast<FakePictureLayerImpl*>( 1657 active_layer_ = static_cast<FakePictureLayerImpl*>(
1658 host_impl_.active_tree()->LayerById(id_)); 1658 host_impl_.active_tree()->LayerById(id_));
1659 1659
1660 EXPECT_EQ(0u, active_layer_->num_tilings()); 1660 EXPECT_EQ(0u, active_layer_->num_tilings());
1661 EXPECT_EQ(!default_lcd_text_setting, active_layer_->is_using_lcd_text()); 1661 // EXPECT_EQ(!default_lcd_text_setting, active_layer_->is_using_lcd_text());
1662 EXPECT_FALSE(active_layer_->needs_post_commit_initialization()); 1662 EXPECT_FALSE(active_layer_->needs_post_commit_initialization());
1663 } 1663 }
1664 1664
1665 TEST_F(PictureLayerImplTest, RemoveInvalidTilesOnActivation) { 1665 TEST_F(PictureLayerImplTest, RemoveInvalidTilesOnActivation) {
1666 SetupDefaultTrees(gfx::Size(1500, 1500)); 1666 SetupDefaultTrees(gfx::Size(1500, 1500));
1667 AddDefaultTilingsWithInvalidation(gfx::Rect(0, 0, 1, 1)); 1667 AddDefaultTilingsWithInvalidation(gfx::Rect(0, 0, 1, 1));
1668 1668
1669 FakePictureLayerImpl* recycled_layer = pending_layer_; 1669 FakePictureLayerImpl* recycled_layer = pending_layer_;
1670 host_impl_.ActivatePendingTree(); 1670 host_impl_.ActivatePendingTree();
1671 1671
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
2955 1.f, // maximum animation scale 2955 1.f, // maximum animation scale
2956 false, 2956 false,
2957 &result_scale_x, 2957 &result_scale_x,
2958 &result_scale_y, 2958 &result_scale_y,
2959 &result_bounds); 2959 &result_bounds);
2960 EXPECT_EQ(1u, pending_layer_->tilings()->num_tilings()); 2960 EXPECT_EQ(1u, pending_layer_->tilings()->num_tilings());
2961 } 2961 }
2962 2962
2963 } // namespace 2963 } // namespace
2964 } // namespace cc 2964 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698