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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 NULL); | 62 NULL); |
63 proxy_ = layer_tree_host_->proxy(); | 63 proxy_ = layer_tree_host_->proxy(); |
64 resource_manager_ = PrioritizedResourceManager::Create(proxy_); | 64 resource_manager_ = PrioritizedResourceManager::Create(proxy_); |
65 layer_tree_host_->InitializeOutputSurfaceIfNeeded(); | 65 layer_tree_host_->InitializeOutputSurfaceIfNeeded(); |
66 layer_tree_host_->SetRootLayer(Layer::Create()); | 66 layer_tree_host_->SetRootLayer(Layer::Create()); |
67 | 67 |
68 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 68 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
69 | 69 |
70 DebugScopedSetImplThreadAndMainThreadBlocked | 70 DebugScopedSetImplThreadAndMainThreadBlocked |
71 impl_thread_and_main_thread_blocked(proxy_); | 71 impl_thread_and_main_thread_blocked(proxy_); |
72 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); | 72 resource_provider_ = |
| 73 ResourceProvider::Create(output_surface_.get(), 0, false); |
73 host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(proxy_)); | 74 host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(proxy_)); |
74 } | 75 } |
75 | 76 |
76 virtual ~TiledLayerTest() { | 77 virtual ~TiledLayerTest() { |
77 ResourceManagerClearAllMemory(resource_manager_.get(), | 78 ResourceManagerClearAllMemory(resource_manager_.get(), |
78 resource_provider_.get()); | 79 resource_provider_.get()); |
79 | 80 |
80 DebugScopedSetImplThreadAndMainThreadBlocked | 81 DebugScopedSetImplThreadAndMainThreadBlocked |
81 impl_thread_and_main_thread_blocked(proxy_); | 82 impl_thread_and_main_thread_blocked(proxy_); |
82 resource_provider_.reset(); | 83 resource_provider_.reset(); |
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 // Invalidate the entire layer in layer space. When painting, the rect given | 1938 // Invalidate the entire layer in layer space. When painting, the rect given |
1938 // to webkit should match the layer's bounds. | 1939 // to webkit should match the layer's bounds. |
1939 layer->SetNeedsDisplayRect(layer_rect); | 1940 layer->SetNeedsDisplayRect(layer_rect); |
1940 layer->Update(queue_.get(), NULL); | 1941 layer->Update(queue_.get(), NULL); |
1941 | 1942 |
1942 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); | 1943 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); |
1943 } | 1944 } |
1944 | 1945 |
1945 } // namespace | 1946 } // namespace |
1946 } // namespace cc | 1947 } // namespace cc |
OLD | NEW |