| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 layer_tree_host_ = LayerTreeHost::Create(&fake_layer_impl_tree_host_client_, | 58 layer_tree_host_ = LayerTreeHost::Create(&fake_layer_impl_tree_host_client_, |
| 59 settings_, | 59 settings_, |
| 60 scoped_ptr<Thread>(NULL)); | 60 scoped_ptr<Thread>(NULL)); |
| 61 proxy_ = layer_tree_host_->proxy(); | 61 proxy_ = layer_tree_host_->proxy(); |
| 62 resource_manager_ = PrioritizedResourceManager::Create(proxy_); | 62 resource_manager_ = PrioritizedResourceManager::Create(proxy_); |
| 63 layer_tree_host_->InitializeRendererIfNeeded(); | 63 layer_tree_host_->InitializeRendererIfNeeded(); |
| 64 layer_tree_host_->SetRootLayer(Layer::Create()); | 64 layer_tree_host_->SetRootLayer(Layer::Create()); |
| 65 | 65 |
| 66 DebugScopedSetImplThreadAndMainThreadBlocked | 66 DebugScopedSetImplThreadAndMainThreadBlocked |
| 67 impl_thread_and_main_thread_blocked(proxy_); | 67 impl_thread_and_main_thread_blocked(proxy_); |
| 68 resource_provider_ = ResourceProvider::Create(output_surface_.get()); | 68 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); |
| 69 host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(proxy_)); | 69 host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(proxy_)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 virtual ~TiledLayerTest() { | 72 virtual ~TiledLayerTest() { |
| 73 ResourceManagerClearAllMemory(resource_manager_.get(), | 73 ResourceManagerClearAllMemory(resource_manager_.get(), |
| 74 resource_provider_.get()); | 74 resource_provider_.get()); |
| 75 | 75 |
| 76 DebugScopedSetImplThreadAndMainThreadBlocked | 76 DebugScopedSetImplThreadAndMainThreadBlocked |
| 77 impl_thread_and_main_thread_blocked(proxy_); | 77 impl_thread_and_main_thread_blocked(proxy_); |
| 78 resource_provider_.reset(); | 78 resource_provider_.reset(); |
| (...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1799 // Invalidate the entire layer in layer space. When painting, the rect given | 1799 // Invalidate the entire layer in layer space. When painting, the rect given |
| 1800 // to webkit should match the layer's bounds. | 1800 // to webkit should match the layer's bounds. |
| 1801 layer->SetNeedsDisplayRect(layer_rect); | 1801 layer->SetNeedsDisplayRect(layer_rect); |
| 1802 layer->Update(queue_.get(), 0, NULL); | 1802 layer->Update(queue_.get(), 0, NULL); |
| 1803 | 1803 |
| 1804 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); | 1804 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); |
| 1805 } | 1805 } |
| 1806 | 1806 |
| 1807 } // namespace | 1807 } // namespace |
| 1808 } // namespace cc | 1808 } // namespace cc |
| OLD | NEW |