OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |