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

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

Issue 363563006: cc: Hide Gpu Rasterization details in Resource Provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update unit/perf tests Create function for gpurasterworkerpool Created 6 years, 5 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/raster_worker_pool_perftest.cc ('k') | cc/resources/resource_provider.h » ('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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 resource_provider_.get()); 134 resource_provider_.get());
135 break; 135 break;
136 case RASTER_WORKER_POOL_TYPE_IMAGE_COPY: 136 case RASTER_WORKER_POOL_TYPE_IMAGE_COPY:
137 raster_worker_pool_ = ImageCopyRasterWorkerPool::Create( 137 raster_worker_pool_ = ImageCopyRasterWorkerPool::Create(
138 base::MessageLoopProxy::current().get(), 138 base::MessageLoopProxy::current().get(),
139 RasterWorkerPool::GetTaskGraphRunner(), 139 RasterWorkerPool::GetTaskGraphRunner(),
140 resource_provider_.get(), 140 resource_provider_.get(),
141 staging_resource_pool_.get()); 141 staging_resource_pool_.get());
142 break; 142 break;
143 case RASTER_WORKER_POOL_TYPE_GPU: 143 case RASTER_WORKER_POOL_TYPE_GPU:
144 raster_worker_pool_ = 144 raster_worker_pool_ = GpuRasterWorkerPool::Create(
145 GpuRasterWorkerPool::Create(base::MessageLoopProxy::current().get(), 145 base::MessageLoopProxy::current().get(), resource_provider_.get());
146 resource_provider_.get(),
147 context_provider_.get());
148 break; 146 break;
149 } 147 }
150 148
151 DCHECK(raster_worker_pool_); 149 DCHECK(raster_worker_pool_);
152 raster_worker_pool_->AsRasterizer()->SetClient(this); 150 raster_worker_pool_->AsRasterizer()->SetClient(this);
153 } 151 }
154 virtual ~RasterWorkerPoolTest() { 152 virtual ~RasterWorkerPoolTest() {
155 staging_resource_pool_.reset(); 153 staging_resource_pool_.reset();
156 resource_provider_.reset(); 154 resource_provider_.reset();
157 } 155 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 322
325 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, 323 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests,
326 RasterWorkerPoolTest, 324 RasterWorkerPoolTest,
327 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, 325 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER,
328 RASTER_WORKER_POOL_TYPE_IMAGE, 326 RASTER_WORKER_POOL_TYPE_IMAGE,
329 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, 327 RASTER_WORKER_POOL_TYPE_IMAGE_COPY,
330 RASTER_WORKER_POOL_TYPE_GPU)); 328 RASTER_WORKER_POOL_TYPE_GPU));
331 329
332 } // namespace 330 } // namespace
333 } // namespace cc 331 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool_perftest.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698