| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 SynchronousOutputSurfaceLayerTreeHost( | 79 SynchronousOutputSurfaceLayerTreeHost( |
| 80 LayerTreeHostClient* client, | 80 LayerTreeHostClient* client, |
| 81 SharedBitmapManager* manager, | 81 SharedBitmapManager* manager, |
| 82 const LayerTreeSettings& settings, | 82 const LayerTreeSettings& settings, |
| 83 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) | 83 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) |
| 84 : LayerTreeHost(client, manager, NULL, settings), | 84 : LayerTreeHost(client, manager, NULL, settings), |
| 85 output_surface_created_(false) { | 85 output_surface_created_(false) { |
| 86 LayerTreeHost::InitializeThreaded(base::MessageLoopProxy::current(), | 86 LayerTreeHost::InitializeThreaded(base::MessageLoopProxy::current(), |
| 87 impl_task_runner); | 87 impl_task_runner, |
| 88 nullptr); |
| 88 } | 89 } |
| 89 | 90 |
| 90 bool output_surface_created_; | 91 bool output_surface_created_; |
| 91 base::RunLoop run_loop_; | 92 base::RunLoop run_loop_; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 class TiledLayerTest : public testing::Test { | 95 class TiledLayerTest : public testing::Test { |
| 95 public: | 96 public: |
| 96 TiledLayerTest() | 97 TiledLayerTest() |
| 97 : proxy_(nullptr), | 98 : proxy_(nullptr), |
| (...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1758 | 1759 |
| 1759 // Rounding leads to an extra pixel. | 1760 // Rounding leads to an extra pixel. |
| 1760 gfx::Rect expanded_layer_rect(layer_rect); | 1761 gfx::Rect expanded_layer_rect(layer_rect); |
| 1761 expanded_layer_rect.set_height(32); | 1762 expanded_layer_rect.set_height(32); |
| 1762 EXPECT_RECT_EQ(expanded_layer_rect, | 1763 EXPECT_RECT_EQ(expanded_layer_rect, |
| 1763 layer->tracking_layer_painter()->PaintedRect()); | 1764 layer->tracking_layer_painter()->PaintedRect()); |
| 1764 } | 1765 } |
| 1765 | 1766 |
| 1766 } // namespace | 1767 } // namespace |
| 1767 } // namespace cc | 1768 } // namespace cc |
| OLD | NEW |