| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/message_loop/message_loop_proxy.h" | 5 #include "base/message_loop/message_loop_proxy.h" |
| 6 #include "base/threading/simple_thread.h" | 6 #include "base/threading/simple_thread.h" |
| 7 #include "cc/layers/delegated_frame_provider.h" | 7 #include "cc/layers/delegated_frame_provider.h" |
| 8 #include "cc/layers/delegated_frame_resource_collection.h" | 8 #include "cc/layers/delegated_frame_resource_collection.h" |
| 9 #include "cc/layers/delegated_renderer_layer.h" | 9 #include "cc/layers/delegated_renderer_layer.h" |
| 10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 class LayerTreeHostNoMessageLoopDelegatedLayer | 158 class LayerTreeHostNoMessageLoopDelegatedLayer |
| 159 : public LayerTreeHostNoMessageLoopTest, | 159 : public LayerTreeHostNoMessageLoopTest, |
| 160 public DelegatedFrameResourceCollectionClient { | 160 public DelegatedFrameResourceCollectionClient { |
| 161 protected: | 161 protected: |
| 162 virtual void RunTestWithoutMessageLoop() OVERRIDE { | 162 virtual void RunTestWithoutMessageLoop() OVERRIDE { |
| 163 resource_collection_ = new DelegatedFrameResourceCollection; | 163 resource_collection_ = new DelegatedFrameResourceCollection; |
| 164 frame_provider_ = new DelegatedFrameProvider( | 164 frame_provider_ = new DelegatedFrameProvider( |
| 165 resource_collection_.get(), CreateFrameDataWithResource(998)); | 165 resource_collection_.get(), CreateFrameDataWithResource(998)); |
| 166 | 166 |
| 167 root_layer_ = Layer::Create(); | 167 root_layer_ = Layer::Create(); |
| 168 delegated_layer_ = FakeDelegatedRendererLayer::Create(frame_provider_); | 168 delegated_layer_ = |
| 169 FakeDelegatedRendererLayer::Create(frame_provider_.get()); |
| 169 delegated_layer_->SetBounds(size_); | 170 delegated_layer_->SetBounds(size_); |
| 170 delegated_layer_->SetIsDrawable(true); | 171 delegated_layer_->SetIsDrawable(true); |
| 171 root_layer_->AddChild(delegated_layer_); | 172 root_layer_->AddChild(delegated_layer_); |
| 172 | 173 |
| 173 SetupLayerTreeHost(); | 174 SetupLayerTreeHost(); |
| 174 | 175 |
| 175 // Draw first frame. | 176 // Draw first frame. |
| 176 Composite(); | 177 Composite(); |
| 177 | 178 |
| 178 // Prepare and draw second frame. | 179 // Prepare and draw second frame. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 scoped_refptr<DelegatedFrameProvider> frame_provider_; | 226 scoped_refptr<DelegatedFrameProvider> frame_provider_; |
| 226 scoped_refptr<DelegatedRendererLayer> delegated_layer_; | 227 scoped_refptr<DelegatedRendererLayer> delegated_layer_; |
| 227 }; | 228 }; |
| 228 | 229 |
| 229 TEST_F(LayerTreeHostNoMessageLoopDelegatedLayer, SingleDelegatedLayer) { | 230 TEST_F(LayerTreeHostNoMessageLoopDelegatedLayer, SingleDelegatedLayer) { |
| 230 RunTest(); | 231 RunTest(); |
| 231 } | 232 } |
| 232 | 233 |
| 233 } // namespace | 234 } // namespace |
| 234 } // namespace cc | 235 } // namespace cc |
| OLD | NEW |