| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 settings_.layer_transforms_should_scale_layer_contents = true; | 88 settings_.layer_transforms_should_scale_layer_contents = true; |
| 89 settings_.verify_property_trees = true; | 89 settings_.verify_property_trees = true; |
| 90 settings_.impl_side_painting = false; | 90 settings_.impl_side_painting = false; |
| 91 } | 91 } |
| 92 | 92 |
| 93 void SetUp() override { | 93 void SetUp() override { |
| 94 impl_thread_.Start(); | 94 impl_thread_.Start(); |
| 95 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 95 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
| 96 layer_tree_host_ = LayerTreeHost::CreateThreaded( | 96 layer_tree_host_ = LayerTreeHost::CreateThreaded( |
| 97 &synchonous_output_surface_client_, shared_bitmap_manager_.get(), | 97 &synchonous_output_surface_client_, shared_bitmap_manager_.get(), |
| 98 nullptr, settings_, base::MessageLoopProxy::current(), | 98 nullptr, nullptr, settings_, base::MessageLoopProxy::current(), |
| 99 impl_thread_.message_loop_proxy(), nullptr); | 99 impl_thread_.message_loop_proxy(), nullptr); |
| 100 synchonous_output_surface_client_.SetLayerTreeHost(layer_tree_host_.get()); | 100 synchonous_output_surface_client_.SetLayerTreeHost(layer_tree_host_.get()); |
| 101 proxy_ = layer_tree_host_->proxy(); | 101 proxy_ = layer_tree_host_->proxy(); |
| 102 resource_manager_ = PrioritizedResourceManager::Create(proxy_); | 102 resource_manager_ = PrioritizedResourceManager::Create(proxy_); |
| 103 layer_tree_host_->SetLayerTreeHostClientReady(); | 103 layer_tree_host_->SetLayerTreeHostClientReady(); |
| 104 CHECK(synchonous_output_surface_client_.EnsureOutputSurfaceCreated()); | 104 CHECK(synchonous_output_surface_client_.EnsureOutputSurfaceCreated()); |
| 105 | 105 |
| 106 layer_tree_host_->SetRootLayer(Layer::Create()); | 106 layer_tree_host_->SetRootLayer(Layer::Create()); |
| 107 | 107 |
| 108 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 108 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
| (...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 | 1747 |
| 1748 // Rounding leads to an extra pixel. | 1748 // Rounding leads to an extra pixel. |
| 1749 gfx::Rect expanded_layer_rect(layer_rect); | 1749 gfx::Rect expanded_layer_rect(layer_rect); |
| 1750 expanded_layer_rect.set_height(32); | 1750 expanded_layer_rect.set_height(32); |
| 1751 EXPECT_EQ(expanded_layer_rect, | 1751 EXPECT_EQ(expanded_layer_rect, |
| 1752 layer->tracking_layer_painter()->PaintedRect()); | 1752 layer->tracking_layer_painter()->PaintedRect()); |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 } // namespace | 1755 } // namespace |
| 1756 } // namespace cc | 1756 } // namespace cc |
| OLD | NEW |