| 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 return gfx::Rect(test_layer_->bounds()); | 1673 return gfx::Rect(test_layer_->bounds()); |
| 1674 } | 1674 } |
| 1675 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 1675 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |
| 1676 PaintingControlSetting picture_control) override { | 1676 PaintingControlSetting picture_control) override { |
| 1677 // Set layer opacity to 0. | 1677 // Set layer opacity to 0. |
| 1678 if (test_layer_) | 1678 if (test_layer_) |
| 1679 test_layer_->SetOpacity(0.f); | 1679 test_layer_->SetOpacity(0.f); |
| 1680 | 1680 |
| 1681 // Return a dummy display list. | 1681 // Return a dummy display list. |
| 1682 scoped_refptr<DisplayItemList> display_list = | 1682 scoped_refptr<DisplayItemList> display_list = |
| 1683 DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings()); | 1683 DisplayItemList::Create(DisplayItemListSettings()); |
| 1684 return display_list; | 1684 return display_list; |
| 1685 } | 1685 } |
| 1686 bool FillsBoundsCompletely() const override { return false; } | 1686 bool FillsBoundsCompletely() const override { return false; } |
| 1687 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } | 1687 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } |
| 1688 | 1688 |
| 1689 private: | 1689 private: |
| 1690 Layer* test_layer_; | 1690 Layer* test_layer_; |
| 1691 }; | 1691 }; |
| 1692 | 1692 |
| 1693 // Layer opacity change during paint should not prevent compositor resources | 1693 // Layer opacity change during paint should not prevent compositor resources |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2280 void set_layer(Layer* layer) { layer_ = layer; } | 2280 void set_layer(Layer* layer) { layer_ = layer; } |
| 2281 | 2281 |
| 2282 gfx::Rect PaintableRegion() override { return gfx::Rect(layer_->bounds()); } | 2282 gfx::Rect PaintableRegion() override { return gfx::Rect(layer_->bounds()); } |
| 2283 | 2283 |
| 2284 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 2284 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |
| 2285 PaintingControlSetting picture_control) override { | 2285 PaintingControlSetting picture_control) override { |
| 2286 layer_->SetBounds(gfx::Size(2, 2)); | 2286 layer_->SetBounds(gfx::Size(2, 2)); |
| 2287 | 2287 |
| 2288 // Return a dummy display list. | 2288 // Return a dummy display list. |
| 2289 scoped_refptr<DisplayItemList> display_list = | 2289 scoped_refptr<DisplayItemList> display_list = |
| 2290 DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings()); | 2290 DisplayItemList::Create(DisplayItemListSettings()); |
| 2291 return display_list; | 2291 return display_list; |
| 2292 } | 2292 } |
| 2293 | 2293 |
| 2294 bool FillsBoundsCompletely() const override { return false; } | 2294 bool FillsBoundsCompletely() const override { return false; } |
| 2295 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } | 2295 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } |
| 2296 | 2296 |
| 2297 private: | 2297 private: |
| 2298 Layer* layer_; | 2298 Layer* layer_; |
| 2299 }; | 2299 }; |
| 2300 | 2300 |
| (...skipping 4378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6679 EndTest(); | 6679 EndTest(); |
| 6680 } | 6680 } |
| 6681 | 6681 |
| 6682 void AfterTest() override {} | 6682 void AfterTest() override {} |
| 6683 }; | 6683 }; |
| 6684 | 6684 |
| 6685 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); | 6685 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
| 6686 | 6686 |
| 6687 } // namespace | 6687 } // namespace |
| 6688 } // namespace cc | 6688 } // namespace cc |
| OLD | NEW |