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/layers/tiled_layer.h" | 5 #include "cc/layers/tiled_layer.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 class TiledLayerTest : public testing::Test { | 79 class TiledLayerTest : public testing::Test { |
80 public: | 80 public: |
81 TiledLayerTest() | 81 TiledLayerTest() |
82 : proxy_(nullptr), | 82 : proxy_(nullptr), |
83 output_surface_(FakeOutputSurface::Create3d()), | 83 output_surface_(FakeOutputSurface::Create3d()), |
84 queue_(make_scoped_ptr(new ResourceUpdateQueue)), | 84 queue_(make_scoped_ptr(new ResourceUpdateQueue)), |
85 impl_thread_("ImplThread"), | 85 impl_thread_("ImplThread"), |
86 occlusion_(nullptr) { | 86 occlusion_(nullptr) { |
87 settings_.max_partial_texture_updates = std::numeric_limits<size_t>::max(); | 87 settings_.max_partial_texture_updates = std::numeric_limits<size_t>::max(); |
88 settings_.layer_transforms_should_scale_layer_contents = true; | 88 settings_.layer_transforms_should_scale_layer_contents = true; |
| 89 settings_.verify_property_trees = true; |
89 } | 90 } |
90 | 91 |
91 void SetUp() override { | 92 void SetUp() override { |
92 impl_thread_.Start(); | 93 impl_thread_.Start(); |
93 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 94 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
94 layer_tree_host_ = LayerTreeHost::CreateThreaded( | 95 layer_tree_host_ = LayerTreeHost::CreateThreaded( |
95 &synchonous_output_surface_client_, shared_bitmap_manager_.get(), | 96 &synchonous_output_surface_client_, shared_bitmap_manager_.get(), |
96 nullptr, settings_, base::MessageLoopProxy::current(), | 97 nullptr, settings_, base::MessageLoopProxy::current(), |
97 impl_thread_.message_loop_proxy(), nullptr); | 98 impl_thread_.message_loop_proxy(), nullptr); |
98 synchonous_output_surface_client_.SetLayerTreeHost(layer_tree_host_.get()); | 99 synchonous_output_surface_client_.SetLayerTreeHost(layer_tree_host_.get()); |
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 | 1746 |
1746 // Rounding leads to an extra pixel. | 1747 // Rounding leads to an extra pixel. |
1747 gfx::Rect expanded_layer_rect(layer_rect); | 1748 gfx::Rect expanded_layer_rect(layer_rect); |
1748 expanded_layer_rect.set_height(32); | 1749 expanded_layer_rect.set_height(32); |
1749 EXPECT_EQ(expanded_layer_rect, | 1750 EXPECT_EQ(expanded_layer_rect, |
1750 layer->tracking_layer_painter()->PaintedRect()); | 1751 layer->tracking_layer_painter()->PaintedRect()); |
1751 } | 1752 } |
1752 | 1753 |
1753 } // namespace | 1754 } // namespace |
1754 } // namespace cc | 1755 } // namespace cc |
OLD | NEW |