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

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

Issue 2026033002: cc: Remove can_use_lcd_text from draw properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/test/layer_tree_host_common_test.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 4532 matching lines...) Expand 10 before | Expand all | Expand 10 after
4543 std::vector<Tile*> tiles = 4543 std::vector<Tile*> tiles =
4544 pending_layer()->HighResTiling()->AllTilesForTesting(); 4544 pending_layer()->HighResTiling()->AllTilesForTesting();
4545 auto prioritized_tiles = pending_layer() 4545 auto prioritized_tiles = pending_layer()
4546 ->HighResTiling() 4546 ->HighResTiling()
4547 ->UpdateAndGetAllPrioritizedTilesForTesting(); 4547 ->UpdateAndGetAllPrioritizedTilesForTesting();
4548 4548
4549 for (Tile* tile : tiles) 4549 for (Tile* tile : tiles)
4550 EXPECT_EQ(pending_layer()->raster_source(), 4550 EXPECT_EQ(pending_layer()->raster_source(),
4551 prioritized_tiles[tile].raster_source()); 4551 prioritized_tiles[tile].raster_source());
4552 4552
4553 pending_layer()->draw_properties().can_use_lcd_text = false; 4553 pending_layer()->SetContentsOpaque(false);
4554 pending_layer()->UpdateCanUseLCDTextAfterCommit(); 4554 pending_layer()->UpdateCanUseLCDTextAfterCommit();
4555 4555
4556 EXPECT_FALSE(pending_layer()->RasterSourceUsesLCDText()); 4556 EXPECT_FALSE(pending_layer()->RasterSourceUsesLCDText());
4557 EXPECT_NE(pending_raster_source.get(), pending_layer()->raster_source()); 4557 EXPECT_NE(pending_raster_source.get(), pending_layer()->raster_source());
4558 EXPECT_TRUE(pending_layer()->HighResTiling()->has_tiles()); 4558 EXPECT_TRUE(pending_layer()->HighResTiling()->has_tiles());
4559 tiles = pending_layer()->HighResTiling()->AllTilesForTesting(); 4559 tiles = pending_layer()->HighResTiling()->AllTilesForTesting();
4560 prioritized_tiles = pending_layer() 4560 prioritized_tiles = pending_layer()
4561 ->HighResTiling() 4561 ->HighResTiling()
4562 ->UpdateAndGetAllPrioritizedTilesForTesting(); 4562 ->UpdateAndGetAllPrioritizedTilesForTesting();
4563 for (Tile* tile : tiles) 4563 for (Tile* tile : tiles)
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
4762 // New low res tiling. 4762 // New low res tiling.
4763 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); 4763 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles());
4764 4764
4765 // This tiling will be high res now, it won't contain low res content since it 4765 // This tiling will be high res now, it won't contain low res content since it
4766 // was all destroyed. 4766 // was all destroyed.
4767 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); 4767 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles());
4768 } 4768 }
4769 4769
4770 } // namespace 4770 } // namespace
4771 } // namespace cc 4771 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/test/layer_tree_host_common_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698