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

Side by Side Diff: cc/trees/layer_tree_host_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/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_impl.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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 2361
2362 void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, 2362 void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl,
2363 const Tile* tile) override { 2363 const Tile* tile) override {
2364 ++num_tiles_rastered_; 2364 ++num_tiles_rastered_;
2365 } 2365 }
2366 2366
2367 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { 2367 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
2368 PictureLayerImpl* root_layer = 2368 PictureLayerImpl* root_layer =
2369 static_cast<PictureLayerImpl*>(host_impl->active_tree()->root_layer()); 2369 static_cast<PictureLayerImpl*>(host_impl->active_tree()->root_layer());
2370 bool can_use_lcd_text = 2370 bool can_use_lcd_text =
2371 host_impl->active_tree()->root_layer()->can_use_lcd_text(); 2371 host_impl->active_tree()->root_layer()->CanUseLCDText();
2372 switch (host_impl->active_tree()->source_frame_number()) { 2372 switch (host_impl->active_tree()->source_frame_number()) {
2373 case 0: 2373 case 0:
2374 // The first draw. 2374 // The first draw.
2375 EXPECT_EQ(1, num_tiles_rastered_); 2375 EXPECT_EQ(1, num_tiles_rastered_);
2376 EXPECT_TRUE(can_use_lcd_text); 2376 EXPECT_TRUE(can_use_lcd_text);
2377 EXPECT_TRUE(root_layer->RasterSourceUsesLCDText()); 2377 EXPECT_TRUE(root_layer->RasterSourceUsesLCDText());
2378 break; 2378 break;
2379 case 1: 2379 case 1:
2380 // Nothing changed on the layer. 2380 // Nothing changed on the layer.
2381 EXPECT_EQ(1, num_tiles_rastered_); 2381 EXPECT_EQ(1, num_tiles_rastered_);
(...skipping 4214 matching lines...) Expand 10 before | Expand all | Expand 10 after
6596 EndTest(); 6596 EndTest();
6597 } 6597 }
6598 6598
6599 void AfterTest() override {} 6599 void AfterTest() override {}
6600 }; 6600 };
6601 6601
6602 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); 6602 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor);
6603 6603
6604 } // namespace 6604 } // namespace
6605 } // namespace cc 6605 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698