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

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

Issue 860813002: Remove the default format from ResourcePool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error in perftest. 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);
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(),
166 resource_provider_.get()->best_texture_format());
166 break; 167 break;
167 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: 168 case TILE_TASK_WORKER_POOL_TYPE_BITMAP:
168 CreateSoftwareOutputSurfaceAndResourceProvider(); 169 CreateSoftwareOutputSurfaceAndResourceProvider();
169 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( 170 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create(
170 base::MessageLoopProxy::current().get(), 171 base::MessageLoopProxy::current().get(),
171 TileTaskWorkerPool::GetTaskGraphRunner(), resource_provider_.get()); 172 TileTaskWorkerPool::GetTaskGraphRunner(), resource_provider_.get());
172 break; 173 break;
173 } 174 }
174 175
175 DCHECK(tile_task_worker_pool_); 176 DCHECK(tile_task_worker_pool_);
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 TileTaskWorkerPoolTests, 398 TileTaskWorkerPoolTests,
398 TileTaskWorkerPoolTest, 399 TileTaskWorkerPoolTest,
399 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, 400 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER,
400 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 401 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
401 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 402 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
402 TILE_TASK_WORKER_POOL_TYPE_GPU, 403 TILE_TASK_WORKER_POOL_TYPE_GPU,
403 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 404 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
404 405
405 } // namespace 406 } // namespace
406 } // namespace cc 407 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698