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

Side by Side Diff: cc/resources/raster_worker_pool_unittest.cc

Issue 502203003: Remove implicit conversions from scoped_refptr to T* in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to use .get() instead of rewriting local variable 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
« no previous file with comments | « cc/resources/prioritized_tile_set_unittest.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/raster_worker_pool.h" 5 #include "cc/resources/raster_worker_pool.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 ASSERT_FALSE(timed_out_) << "Test timed out"; 197 ASSERT_FALSE(timed_out_) << "Test timed out";
198 } 198 }
199 199
200 void ScheduleTasks() { 200 void ScheduleTasks() {
201 RasterTaskQueue queue; 201 RasterTaskQueue queue;
202 202
203 for (RasterTaskVector::const_iterator it = tasks_.begin(); 203 for (RasterTaskVector::const_iterator it = tasks_.begin();
204 it != tasks_.end(); 204 it != tasks_.end();
205 ++it) 205 ++it)
206 queue.items.push_back(RasterTaskQueue::Item(*it, false)); 206 queue.items.push_back(RasterTaskQueue::Item(it->get(), false));
207 207
208 raster_worker_pool_->AsRasterizer()->ScheduleTasks(&queue); 208 raster_worker_pool_->AsRasterizer()->ScheduleTasks(&queue);
209 } 209 }
210 210
211 void AppendTask(unsigned id, const gfx::Size& size) { 211 void AppendTask(unsigned id, const gfx::Size& size) {
212 scoped_ptr<ScopedResource> resource( 212 scoped_ptr<ScopedResource> resource(
213 ScopedResource::Create(resource_provider_.get())); 213 ScopedResource::Create(resource_provider_.get()));
214 resource->Allocate(size, ResourceProvider::TextureHintImmutable, RGBA_8888); 214 resource->Allocate(size, ResourceProvider::TextureHintImmutable, RGBA_8888);
215 const Resource* const_resource = resource.get(); 215 const Resource* const_resource = resource.get();
216 216
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, 353 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests,
354 RasterWorkerPoolTest, 354 RasterWorkerPoolTest,
355 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, 355 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER,
356 RASTER_WORKER_POOL_TYPE_IMAGE, 356 RASTER_WORKER_POOL_TYPE_IMAGE,
357 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, 357 RASTER_WORKER_POOL_TYPE_IMAGE_COPY,
358 RASTER_WORKER_POOL_TYPE_GPU)); 358 RASTER_WORKER_POOL_TYPE_GPU));
359 359
360 } // namespace 360 } // namespace
361 } // namespace cc 361 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/prioritized_tile_set_unittest.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698