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 "cc/debug/overdraw_metrics.h" | 10 #include "cc/debug/overdraw_metrics.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 virtual void SetUp() { | 60 virtual void SetUp() { |
61 impl_thread_.Start(); | 61 impl_thread_.Start(); |
62 layer_tree_host_ = LayerTreeHost::CreateThreaded( | 62 layer_tree_host_ = LayerTreeHost::CreateThreaded( |
63 &fake_layer_tree_host_client_, | 63 &fake_layer_tree_host_client_, |
64 NULL, | 64 NULL, |
65 settings_, | 65 settings_, |
66 impl_thread_.message_loop_proxy()); | 66 impl_thread_.message_loop_proxy()); |
67 proxy_ = layer_tree_host_->proxy(); | 67 proxy_ = layer_tree_host_->proxy(); |
68 resource_manager_ = PrioritizedResourceManager::Create(proxy_); | 68 resource_manager_ = PrioritizedResourceManager::Create(proxy_); |
69 layer_tree_host_->SetLayerTreeHostClientReady(); | 69 layer_tree_host_->SetLayerTreeHostClientReady( |
| 70 fake_layer_tree_host_client_.CreateOutputSurface(false)); |
70 layer_tree_host_->InitializeOutputSurfaceIfNeeded(); | 71 layer_tree_host_->InitializeOutputSurfaceIfNeeded(); |
71 layer_tree_host_->SetRootLayer(Layer::Create()); | 72 layer_tree_host_->SetRootLayer(Layer::Create()); |
72 | 73 |
73 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 74 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
74 | 75 |
75 DebugScopedSetImplThreadAndMainThreadBlocked | 76 DebugScopedSetImplThreadAndMainThreadBlocked |
76 impl_thread_and_main_thread_blocked(proxy_); | 77 impl_thread_and_main_thread_blocked(proxy_); |
77 resource_provider_ = | 78 resource_provider_ = |
78 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); | 79 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); |
79 host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(proxy_)); | 80 host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(proxy_)); |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1947 // Invalidate the entire layer in layer space. When painting, the rect given | 1948 // Invalidate the entire layer in layer space. When painting, the rect given |
1948 // to webkit should match the layer's bounds. | 1949 // to webkit should match the layer's bounds. |
1949 layer->SetNeedsDisplayRect(layer_rect); | 1950 layer->SetNeedsDisplayRect(layer_rect); |
1950 layer->Update(queue_.get(), NULL); | 1951 layer->Update(queue_.get(), NULL); |
1951 | 1952 |
1952 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); | 1953 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); |
1953 } | 1954 } |
1954 | 1955 |
1955 } // namespace | 1956 } // namespace |
1956 } // namespace cc | 1957 } // namespace cc |
OLD | NEW |