| 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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1546 }; |  1546 }; | 
|  1547  |  1547  | 
|  1548 MULTI_THREAD_TEST_F(LayerTreeHostTestSetVisible); |  1548 MULTI_THREAD_TEST_F(LayerTreeHostTestSetVisible); | 
|  1549  |  1549  | 
|  1550 class TestOpacityChangeLayerDelegate : public ContentLayerClient { |  1550 class TestOpacityChangeLayerDelegate : public ContentLayerClient { | 
|  1551  public: |  1551  public: | 
|  1552   TestOpacityChangeLayerDelegate() : test_layer_(0) {} |  1552   TestOpacityChangeLayerDelegate() : test_layer_(0) {} | 
|  1553  |  1553  | 
|  1554   void SetTestLayer(Layer* test_layer) { test_layer_ = test_layer; } |  1554   void SetTestLayer(Layer* test_layer) { test_layer_ = test_layer; } | 
|  1555  |  1555  | 
|  1556   void PaintContents(SkCanvas* canvas, |  | 
|  1557                      const gfx::Rect& clip, |  | 
|  1558                      PaintingControlSetting picture_control) override { |  | 
|  1559     NOTIMPLEMENTED(); |  | 
|  1560   } |  | 
|  1561   scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |  1556   scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 
|  1562       const gfx::Rect& clip, |  1557       const gfx::Rect& clip, | 
|  1563       PaintingControlSetting picture_control) override { |  1558       PaintingControlSetting picture_control) override { | 
|  1564     // Set layer opacity to 0. |  1559     // Set layer opacity to 0. | 
|  1565     if (test_layer_) |  1560     if (test_layer_) | 
|  1566       test_layer_->SetOpacity(0.f); |  1561       test_layer_->SetOpacity(0.f); | 
|  1567  |  1562  | 
|  1568     // Return a dummy display list. |  1563     // Return a dummy display list. | 
|  1569     scoped_refptr<DisplayItemList> display_list = |  1564     scoped_refptr<DisplayItemList> display_list = | 
|  1570         DisplayItemList::Create(clip, DisplayItemListSettings()); |  1565         DisplayItemList::Create(clip, DisplayItemListSettings()); | 
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2152  |  2147  | 
|  2153 class LayerTreeHostTestChangeLayerPropertiesInPaintContents |  2148 class LayerTreeHostTestChangeLayerPropertiesInPaintContents | 
|  2154     : public LayerTreeHostTest { |  2149     : public LayerTreeHostTest { | 
|  2155  public: |  2150  public: | 
|  2156   class SetBoundsClient : public ContentLayerClient { |  2151   class SetBoundsClient : public ContentLayerClient { | 
|  2157    public: |  2152    public: | 
|  2158     SetBoundsClient() : layer_(0) {} |  2153     SetBoundsClient() : layer_(0) {} | 
|  2159  |  2154  | 
|  2160     void set_layer(Layer* layer) { layer_ = layer; } |  2155     void set_layer(Layer* layer) { layer_ = layer; } | 
|  2161  |  2156  | 
|  2162     void PaintContents(SkCanvas* canvas, |  | 
|  2163                        const gfx::Rect& clip, |  | 
|  2164                        PaintingControlSetting picture_control) override { |  | 
|  2165       NOTIMPLEMENTED(); |  | 
|  2166     } |  | 
|  2167  |  | 
|  2168     scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |  2157     scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 
|  2169         const gfx::Rect& clip, |  2158         const gfx::Rect& clip, | 
|  2170         PaintingControlSetting picture_control) override { |  2159         PaintingControlSetting picture_control) override { | 
|  2171       layer_->SetBounds(gfx::Size(2, 2)); |  2160       layer_->SetBounds(gfx::Size(2, 2)); | 
|  2172  |  2161  | 
|  2173       // Return a dummy display list. |  2162       // Return a dummy display list. | 
|  2174       scoped_refptr<DisplayItemList> display_list = |  2163       scoped_refptr<DisplayItemList> display_list = | 
|  2175           DisplayItemList::Create(clip, DisplayItemListSettings()); |  2164           DisplayItemList::Create(clip, DisplayItemListSettings()); | 
|  2176       return display_list; |  2165       return display_list; | 
|  2177     } |  2166     } | 
| (...skipping 4206 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6384     EndTest(); |  6373     EndTest(); | 
|  6385   } |  6374   } | 
|  6386  |  6375  | 
|  6387   void AfterTest() override {} |  6376   void AfterTest() override {} | 
|  6388 }; |  6377 }; | 
|  6389  |  6378  | 
|  6390 MULTI_THREAD_TEST_F(LayerTreeHostTestDestroyWhileInitializingOutputSurface); |  6379 MULTI_THREAD_TEST_F(LayerTreeHostTestDestroyWhileInitializingOutputSurface); | 
|  6391  |  6380  | 
|  6392 }  // namespace |  6381 }  // namespace | 
|  6393 }  // namespace cc |  6382 }  // namespace cc | 
| OLD | NEW |