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 resource_manager_ = PrioritizedResourceManager::Create(proxy_); | 115 resource_manager_ = PrioritizedResourceManager::Create(proxy_); |
116 layer_tree_host_->SetLayerTreeHostClientReady(); | 116 layer_tree_host_->SetLayerTreeHostClientReady(); |
117 CHECK(layer_tree_host_->EnsureOutputSurfaceCreated()); | 117 CHECK(layer_tree_host_->EnsureOutputSurfaceCreated()); |
118 layer_tree_host_->SetRootLayer(Layer::Create()); | 118 layer_tree_host_->SetRootLayer(Layer::Create()); |
119 | 119 |
120 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 120 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
121 | 121 |
122 DebugScopedSetImplThreadAndMainThreadBlocked | 122 DebugScopedSetImplThreadAndMainThreadBlocked |
123 impl_thread_and_main_thread_blocked(proxy_); | 123 impl_thread_and_main_thread_blocked(proxy_); |
124 resource_provider_ = ResourceProvider::Create( | 124 resource_provider_ = ResourceProvider::Create( |
125 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); | 125 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, |
| 126 false); |
126 host_impl_ = make_scoped_ptr( | 127 host_impl_ = make_scoped_ptr( |
127 new FakeLayerTreeHostImpl(proxy_, shared_bitmap_manager_.get())); | 128 new FakeLayerTreeHostImpl(proxy_, shared_bitmap_manager_.get())); |
128 } | 129 } |
129 | 130 |
130 virtual ~TiledLayerTest() { | 131 virtual ~TiledLayerTest() { |
131 ResourceManagerClearAllMemory(resource_manager_.get(), | 132 ResourceManagerClearAllMemory(resource_manager_.get(), |
132 resource_provider_.get()); | 133 resource_provider_.get()); |
133 | 134 |
134 DebugScopedSetImplThreadAndMainThreadBlocked | 135 DebugScopedSetImplThreadAndMainThreadBlocked |
135 impl_thread_and_main_thread_blocked(proxy_); | 136 impl_thread_and_main_thread_blocked(proxy_); |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 // Invalidate the entire layer in layer space. When painting, the rect given | 1815 // Invalidate the entire layer in layer space. When painting, the rect given |
1815 // to webkit should match the layer's bounds. | 1816 // to webkit should match the layer's bounds. |
1816 layer->SetNeedsDisplayRect(layer_rect); | 1817 layer->SetNeedsDisplayRect(layer_rect); |
1817 layer->Update(queue_.get(), NULL); | 1818 layer->Update(queue_.get(), NULL); |
1818 | 1819 |
1819 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); | 1820 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); |
1820 } | 1821 } |
1821 | 1822 |
1822 } // namespace | 1823 } // namespace |
1823 } // namespace cc | 1824 } // namespace cc |
OLD | NEW |