| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 | 1318 |
| 1319 void SetTestLayer(Layer* test_layer) { test_layer_ = test_layer; } | 1319 void SetTestLayer(Layer* test_layer) { test_layer_ = test_layer; } |
| 1320 | 1320 |
| 1321 void PaintContents(SkCanvas* canvas, | 1321 void PaintContents(SkCanvas* canvas, |
| 1322 const gfx::Rect& clip, | 1322 const gfx::Rect& clip, |
| 1323 PaintingControlSetting picture_control) override { | 1323 PaintingControlSetting picture_control) override { |
| 1324 // Set layer opacity to 0. | 1324 // Set layer opacity to 0. |
| 1325 if (test_layer_) | 1325 if (test_layer_) |
| 1326 test_layer_->SetOpacity(0.f); | 1326 test_layer_->SetOpacity(0.f); |
| 1327 } | 1327 } |
| 1328 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 1328 void PaintContentsToDisplayList( |
| 1329 DisplayItemList* display_list, |
| 1329 const gfx::Rect& clip, | 1330 const gfx::Rect& clip, |
| 1330 PaintingControlSetting picture_control) override { | 1331 PaintingControlSetting picture_control) override { |
| 1331 NOTIMPLEMENTED(); | 1332 NOTIMPLEMENTED(); |
| 1332 return DisplayItemList::Create(); | |
| 1333 } | 1333 } |
| 1334 bool FillsBoundsCompletely() const override { return false; } | 1334 bool FillsBoundsCompletely() const override { return false; } |
| 1335 | 1335 |
| 1336 private: | 1336 private: |
| 1337 Layer* test_layer_; | 1337 Layer* test_layer_; |
| 1338 }; | 1338 }; |
| 1339 | 1339 |
| 1340 class ContentLayerWithUpdateTracking : public ContentLayer { | 1340 class ContentLayerWithUpdateTracking : public ContentLayer { |
| 1341 public: | 1341 public: |
| 1342 static scoped_refptr<ContentLayerWithUpdateTracking> Create( | 1342 static scoped_refptr<ContentLayerWithUpdateTracking> Create( |
| (...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2783 SetBoundsClient() : layer_(0) {} | 2783 SetBoundsClient() : layer_(0) {} |
| 2784 | 2784 |
| 2785 void set_layer(Layer* layer) { layer_ = layer; } | 2785 void set_layer(Layer* layer) { layer_ = layer; } |
| 2786 | 2786 |
| 2787 void PaintContents(SkCanvas* canvas, | 2787 void PaintContents(SkCanvas* canvas, |
| 2788 const gfx::Rect& clip, | 2788 const gfx::Rect& clip, |
| 2789 PaintingControlSetting picture_control) override { | 2789 PaintingControlSetting picture_control) override { |
| 2790 layer_->SetBounds(gfx::Size(2, 2)); | 2790 layer_->SetBounds(gfx::Size(2, 2)); |
| 2791 } | 2791 } |
| 2792 | 2792 |
| 2793 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 2793 void PaintContentsToDisplayList( |
| 2794 DisplayItemList* display_list, |
| 2794 const gfx::Rect& clip, | 2795 const gfx::Rect& clip, |
| 2795 PaintingControlSetting picture_control) override { | 2796 PaintingControlSetting picture_control) override { |
| 2796 NOTIMPLEMENTED(); | 2797 NOTIMPLEMENTED(); |
| 2797 return DisplayItemList::Create(); | |
| 2798 } | 2798 } |
| 2799 | 2799 |
| 2800 bool FillsBoundsCompletely() const override { return false; } | 2800 bool FillsBoundsCompletely() const override { return false; } |
| 2801 | 2801 |
| 2802 private: | 2802 private: |
| 2803 Layer* layer_; | 2803 Layer* layer_; |
| 2804 }; | 2804 }; |
| 2805 | 2805 |
| 2806 LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {} | 2806 LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {} |
| 2807 | 2807 |
| (...skipping 3664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6472 | 6472 |
| 6473 void AfterTest() override {} | 6473 void AfterTest() override {} |
| 6474 | 6474 |
| 6475 private: | 6475 private: |
| 6476 scoped_refptr<Layer> child_; | 6476 scoped_refptr<Layer> child_; |
| 6477 }; | 6477 }; |
| 6478 | 6478 |
| 6479 SINGLE_AND_MULTI_THREAD_TEST_F(LayerPreserveRenderSurfaceFromOutputRequests); | 6479 SINGLE_AND_MULTI_THREAD_TEST_F(LayerPreserveRenderSurfaceFromOutputRequests); |
| 6480 | 6480 |
| 6481 } // namespace cc | 6481 } // namespace cc |
| OLD | NEW |