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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 proxy_ = layer_tree_host_->proxy(); | 115 proxy_ = layer_tree_host_->proxy(); |
116 resource_manager_ = PrioritizedResourceManager::Create(proxy_); | 116 resource_manager_ = PrioritizedResourceManager::Create(proxy_); |
117 layer_tree_host_->SetLayerTreeHostClientReady(); | 117 layer_tree_host_->SetLayerTreeHostClientReady(); |
118 CHECK(layer_tree_host_->EnsureOutputSurfaceCreated()); | 118 CHECK(layer_tree_host_->EnsureOutputSurfaceCreated()); |
119 layer_tree_host_->SetRootLayer(Layer::Create()); | 119 layer_tree_host_->SetRootLayer(Layer::Create()); |
120 | 120 |
121 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 121 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
122 | 122 |
123 DebugScopedSetImplThreadAndMainThreadBlocked | 123 DebugScopedSetImplThreadAndMainThreadBlocked |
124 impl_thread_and_main_thread_blocked(proxy_); | 124 impl_thread_and_main_thread_blocked(proxy_); |
125 resource_provider_ = ResourceProvider::Create(output_surface_.get(), | 125 resource_provider_ = ResourceProvider::Create( |
126 shared_bitmap_manager_.get(), | 126 output_surface_.get(), shared_bitmap_manager_.get(), nullptr, nullptr, |
127 nullptr, | 127 0, false, false, 1); |
128 nullptr, | |
129 0, | |
130 false, | |
131 1); | |
132 host_impl_ = make_scoped_ptr( | 128 host_impl_ = make_scoped_ptr( |
133 new FakeLayerTreeHostImpl(proxy_, shared_bitmap_manager_.get())); | 129 new FakeLayerTreeHostImpl(proxy_, shared_bitmap_manager_.get())); |
134 } | 130 } |
135 | 131 |
136 virtual ~TiledLayerTest() { | 132 virtual ~TiledLayerTest() { |
137 ResourceManagerClearAllMemory(resource_manager_.get(), | 133 ResourceManagerClearAllMemory(resource_manager_.get(), |
138 resource_provider_.get()); | 134 resource_provider_.get()); |
139 | 135 |
140 DebugScopedSetImplThreadAndMainThreadBlocked | 136 DebugScopedSetImplThreadAndMainThreadBlocked |
141 impl_thread_and_main_thread_blocked(proxy_); | 137 impl_thread_and_main_thread_blocked(proxy_); |
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1760 | 1756 |
1761 // Rounding leads to an extra pixel. | 1757 // Rounding leads to an extra pixel. |
1762 gfx::Rect expanded_layer_rect(layer_rect); | 1758 gfx::Rect expanded_layer_rect(layer_rect); |
1763 expanded_layer_rect.set_height(32); | 1759 expanded_layer_rect.set_height(32); |
1764 EXPECT_EQ(expanded_layer_rect, | 1760 EXPECT_EQ(expanded_layer_rect, |
1765 layer->tracking_layer_painter()->PaintedRect()); | 1761 layer->tracking_layer_painter()->PaintedRect()); |
1766 } | 1762 } |
1767 | 1763 |
1768 } // namespace | 1764 } // namespace |
1769 } // namespace cc | 1765 } // namespace cc |
OLD | NEW |