Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: cc/trees/layer_tree_host_unittest_no_message_loop.cc

Issue 500123003: Remove implicit conversions from scoped_refptr to T* in cc/trees/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_delegated.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698