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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 : proxy_(nullptr), | 96 : proxy_(nullptr), |
97 output_surface_(FakeOutputSurface::Create3d()), | 97 output_surface_(FakeOutputSurface::Create3d()), |
98 queue_(make_scoped_ptr(new ResourceUpdateQueue)), | 98 queue_(make_scoped_ptr(new ResourceUpdateQueue)), |
99 impl_thread_("ImplThread"), | 99 impl_thread_("ImplThread"), |
100 fake_layer_tree_host_client_(FakeLayerTreeHostClient::DIRECT_3D), | 100 fake_layer_tree_host_client_(FakeLayerTreeHostClient::DIRECT_3D), |
101 occlusion_(nullptr) { | 101 occlusion_(nullptr) { |
102 settings_.max_partial_texture_updates = std::numeric_limits<size_t>::max(); | 102 settings_.max_partial_texture_updates = std::numeric_limits<size_t>::max(); |
103 settings_.layer_transforms_should_scale_layer_contents = true; | 103 settings_.layer_transforms_should_scale_layer_contents = true; |
104 } | 104 } |
105 | 105 |
106 virtual void SetUp() { | 106 void SetUp() override { |
107 impl_thread_.Start(); | 107 impl_thread_.Start(); |
108 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 108 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
109 layer_tree_host_ = SynchronousOutputSurfaceLayerTreeHost::Create( | 109 layer_tree_host_ = SynchronousOutputSurfaceLayerTreeHost::Create( |
110 &fake_layer_tree_host_client_, | 110 &fake_layer_tree_host_client_, |
111 shared_bitmap_manager_.get(), | 111 shared_bitmap_manager_.get(), |
112 settings_, | 112 settings_, |
113 impl_thread_.message_loop_proxy()); | 113 impl_thread_.message_loop_proxy()); |
114 fake_layer_tree_host_client_.SetLayerTreeHost(layer_tree_host_.get()); | 114 fake_layer_tree_host_client_.SetLayerTreeHost(layer_tree_host_.get()); |
115 proxy_ = layer_tree_host_->proxy(); | 115 proxy_ = layer_tree_host_->proxy(); |
116 resource_manager_ = PrioritizedResourceManager::Create(proxy_); | 116 resource_manager_ = PrioritizedResourceManager::Create(proxy_); |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 | 1752 |
1753 // Rounding leads to an extra pixel. | 1753 // Rounding leads to an extra pixel. |
1754 gfx::Rect expanded_layer_rect(layer_rect); | 1754 gfx::Rect expanded_layer_rect(layer_rect); |
1755 expanded_layer_rect.set_height(32); | 1755 expanded_layer_rect.set_height(32); |
1756 EXPECT_RECT_EQ(expanded_layer_rect, | 1756 EXPECT_RECT_EQ(expanded_layer_rect, |
1757 layer->tracking_layer_painter()->PaintedRect()); | 1757 layer->tracking_layer_painter()->PaintedRect()); |
1758 } | 1758 } |
1759 | 1759 |
1760 } // namespace | 1760 } // namespace |
1761 } // namespace cc | 1761 } // namespace cc |
OLD | NEW |