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

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

Issue 817133006: Support different formats in the same resource pool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ResourceFormatUsage Created 5 years, 11 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 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/tile_task_worker_pool.h" 5 #include "cc/resources/tile_task_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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 break; 145 break;
146 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: 146 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY:
147 Create3dOutputSurfaceAndResourceProvider(); 147 Create3dOutputSurfaceAndResourceProvider();
148 tile_task_worker_pool_ = ZeroCopyTileTaskWorkerPool::Create( 148 tile_task_worker_pool_ = ZeroCopyTileTaskWorkerPool::Create(
149 base::MessageLoopProxy::current().get(), 149 base::MessageLoopProxy::current().get(),
150 TileTaskWorkerPool::GetTaskGraphRunner(), resource_provider_.get()); 150 TileTaskWorkerPool::GetTaskGraphRunner(), resource_provider_.get());
151 break; 151 break;
152 case TILE_TASK_WORKER_POOL_TYPE_ONE_COPY: 152 case TILE_TASK_WORKER_POOL_TYPE_ONE_COPY:
153 Create3dOutputSurfaceAndResourceProvider(); 153 Create3dOutputSurfaceAndResourceProvider();
154 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(), 154 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(),
155 GL_TEXTURE_2D, RGBA_8888); 155 GL_TEXTURE_2D, false);
156 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( 156 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create(
157 base::MessageLoopProxy::current().get(), 157 base::MessageLoopProxy::current().get(),
158 TileTaskWorkerPool::GetTaskGraphRunner(), context_provider_.get(), 158 TileTaskWorkerPool::GetTaskGraphRunner(), context_provider_.get(),
159 resource_provider_.get(), staging_resource_pool_.get()); 159 resource_provider_.get(), staging_resource_pool_.get());
160 break; 160 break;
161 case TILE_TASK_WORKER_POOL_TYPE_GPU: 161 case TILE_TASK_WORKER_POOL_TYPE_GPU:
162 Create3dOutputSurfaceAndResourceProvider(); 162 Create3dOutputSurfaceAndResourceProvider();
163 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( 163 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create(
164 base::MessageLoopProxy::current().get(), 164 base::MessageLoopProxy::current().get(),
165 TileTaskWorkerPool::GetTaskGraphRunner()); 165 TileTaskWorkerPool::GetTaskGraphRunner());
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 TileTaskWorkerPoolTests, 397 TileTaskWorkerPoolTests,
398 TileTaskWorkerPoolTest, 398 TileTaskWorkerPoolTest,
399 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, 399 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER,
400 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 400 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
401 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 401 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
402 TILE_TASK_WORKER_POOL_TYPE_GPU, 402 TILE_TASK_WORKER_POOL_TYPE_GPU,
403 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 403 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
404 404
405 } // namespace 405 } // namespace
406 } // namespace cc 406 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698