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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } | 104 } |
105 | 105 |
106 virtual void SetUp() { | 106 virtual void SetUp() { |
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 proxy_ = layer_tree_host_->proxy(); | 115 proxy_ = layer_tree_host_->proxy(); |
115 resource_manager_ = PrioritizedResourceManager::Create(proxy_); | 116 resource_manager_ = PrioritizedResourceManager::Create(proxy_); |
116 layer_tree_host_->SetLayerTreeHostClientReady(); | 117 layer_tree_host_->SetLayerTreeHostClientReady(); |
117 CHECK(layer_tree_host_->EnsureOutputSurfaceCreated()); | 118 CHECK(layer_tree_host_->EnsureOutputSurfaceCreated()); |
118 layer_tree_host_->SetRootLayer(Layer::Create()); | 119 layer_tree_host_->SetRootLayer(Layer::Create()); |
119 | 120 |
120 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 121 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
121 | 122 |
122 DebugScopedSetImplThreadAndMainThreadBlocked | 123 DebugScopedSetImplThreadAndMainThreadBlocked |
123 impl_thread_and_main_thread_blocked(proxy_); | 124 impl_thread_and_main_thread_blocked(proxy_); |
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1810 // Invalidate the entire layer in layer space. When painting, the rect given | 1811 // Invalidate the entire layer in layer space. When painting, the rect given |
1811 // to webkit should match the layer's bounds. | 1812 // to webkit should match the layer's bounds. |
1812 layer->SetNeedsDisplayRect(layer_rect); | 1813 layer->SetNeedsDisplayRect(layer_rect); |
1813 layer->Update(queue_.get(), NULL); | 1814 layer->Update(queue_.get(), NULL); |
1814 | 1815 |
1815 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); | 1816 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); |
1816 } | 1817 } |
1817 | 1818 |
1818 } // namespace | 1819 } // namespace |
1819 } // namespace cc | 1820 } // namespace cc |
OLD | NEW |