| 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/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 3980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3991 int num_draws_; | 3991 int num_draws_; |
| 3992 }; | 3992 }; |
| 3993 | 3993 |
| 3994 // VideoLayer must support being invalidated and then passing that along | 3994 // VideoLayer must support being invalidated and then passing that along |
| 3995 // to the compositor thread, even though no resources are updated in | 3995 // to the compositor thread, even though no resources are updated in |
| 3996 // response to that invalidation. | 3996 // response to that invalidation. |
| 3997 class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw { | 3997 class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw { |
| 3998 public: | 3998 public: |
| 3999 virtual void SetupTree() OVERRIDE { | 3999 virtual void SetupTree() OVERRIDE { |
| 4000 LayerTreeHostTest::SetupTree(); | 4000 LayerTreeHostTest::SetupTree(); |
| 4001 scoped_refptr<VideoLayer> video_layer = VideoLayer::Create(&provider_); | 4001 scoped_refptr<VideoLayer> video_layer = |
| 4002 VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0); |
| 4002 video_layer->SetBounds(gfx::Size(10, 10)); | 4003 video_layer->SetBounds(gfx::Size(10, 10)); |
| 4003 video_layer->SetIsDrawable(true); | 4004 video_layer->SetIsDrawable(true); |
| 4004 layer_tree_host()->root_layer()->AddChild(video_layer); | 4005 layer_tree_host()->root_layer()->AddChild(video_layer); |
| 4005 | 4006 |
| 4006 invalidate_layer_ = video_layer; | 4007 invalidate_layer_ = video_layer; |
| 4007 } | 4008 } |
| 4008 | 4009 |
| 4009 private: | 4010 private: |
| 4010 FakeVideoFrameProvider provider_; | 4011 FakeVideoFrameProvider provider_; |
| 4011 }; | 4012 }; |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4967 const gfx::Size bounds_; | 4968 const gfx::Size bounds_; |
| 4968 FakeContentLayerClient client_; | 4969 FakeContentLayerClient client_; |
| 4969 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; | 4970 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; |
| 4970 scoped_refptr<FakePictureLayer> picture_layer_; | 4971 scoped_refptr<FakePictureLayer> picture_layer_; |
| 4971 Layer* child_layer_; | 4972 Layer* child_layer_; |
| 4972 }; | 4973 }; |
| 4973 | 4974 |
| 4974 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); | 4975 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); |
| 4975 | 4976 |
| 4976 } // namespace cc | 4977 } // namespace cc |
| OLD | NEW |