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

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

Issue 1379783002: Allow one-copy task tile worker pool to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove needs_conversion, fix tile size unit test and move modulo 4 DCHECK (for tests) Created 5 years 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/raster/tile_task_worker_pool.h" 5 #include "cc/raster/tile_task_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 timeout_seconds_(5), 139 timeout_seconds_(5),
140 timed_out_(false) {} 140 timed_out_(false) {}
141 141
142 // Overridden from testing::Test: 142 // Overridden from testing::Test:
143 void SetUp() override { 143 void SetUp() override {
144 switch (GetParam()) { 144 switch (GetParam()) {
145 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: 145 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY:
146 Create3dOutputSurfaceAndResourceProvider(); 146 Create3dOutputSurfaceAndResourceProvider();
147 tile_task_worker_pool_ = ZeroCopyTileTaskWorkerPool::Create( 147 tile_task_worker_pool_ = ZeroCopyTileTaskWorkerPool::Create(
148 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_, 148 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_,
149 resource_provider_.get(), false); 149 resource_provider_.get(), PlatformColor::BestTextureFormat());
150 break; 150 break;
151 case TILE_TASK_WORKER_POOL_TYPE_ONE_COPY: 151 case TILE_TASK_WORKER_POOL_TYPE_ONE_COPY:
152 Create3dOutputSurfaceAndResourceProvider(); 152 Create3dOutputSurfaceAndResourceProvider();
153 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( 153 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create(
154 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_, 154 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_,
155 context_provider_.get(), resource_provider_.get(), 155 context_provider_.get(), resource_provider_.get(),
156 kMaxBytesPerCopyOperation, false, kMaxStagingBuffers, false); 156 kMaxBytesPerCopyOperation, false, kMaxStagingBuffers,
157 PlatformColor::BestTextureFormat());
157 break; 158 break;
158 case TILE_TASK_WORKER_POOL_TYPE_GPU: 159 case TILE_TASK_WORKER_POOL_TYPE_GPU:
159 Create3dOutputSurfaceAndResourceProvider(); 160 Create3dOutputSurfaceAndResourceProvider();
160 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( 161 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create(
161 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_, 162 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_,
162 context_provider_.get(), resource_provider_.get(), false, 0); 163 context_provider_.get(), resource_provider_.get(), false, 0);
163 break; 164 break;
164 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: 165 case TILE_TASK_WORKER_POOL_TYPE_BITMAP:
165 CreateSoftwareOutputSurfaceAndResourceProvider(); 166 CreateSoftwareOutputSurfaceAndResourceProvider();
166 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( 167 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create(
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 369
369 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, 370 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests,
370 TileTaskWorkerPoolTest, 371 TileTaskWorkerPoolTest,
371 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 372 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
372 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 373 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
373 TILE_TASK_WORKER_POOL_TYPE_GPU, 374 TILE_TASK_WORKER_POOL_TYPE_GPU,
374 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 375 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
375 376
376 } // namespace 377 } // namespace
377 } // namespace cc 378 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698