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

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

Issue 1713503002: Reland Allow one-copy and zero-copy task tile worker pools to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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/raster/tile_task_worker_pool.h" 5 #include "cc/raster/tile_task_worker_pool.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 timeout_seconds_(5), 140 timeout_seconds_(5),
141 timed_out_(false) {} 141 timed_out_(false) {}
142 142
143 // Overridden from testing::Test: 143 // Overridden from testing::Test:
144 void SetUp() override { 144 void SetUp() override {
145 switch (GetParam()) { 145 switch (GetParam()) {
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::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_, 149 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_,
150 resource_provider_.get(), false); 150 resource_provider_.get(), PlatformColor::BestTextureFormat());
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 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( 154 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create(
155 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_, 155 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_,
156 context_provider_.get(), resource_provider_.get(), 156 context_provider_.get(), resource_provider_.get(),
157 kMaxBytesPerCopyOperation, false, kMaxStagingBuffers, false); 157 kMaxBytesPerCopyOperation, false, kMaxStagingBuffers,
158 PlatformColor::BestTextureFormat());
158 break; 159 break;
159 case TILE_TASK_WORKER_POOL_TYPE_GPU: 160 case TILE_TASK_WORKER_POOL_TYPE_GPU:
160 Create3dOutputSurfaceAndResourceProvider(); 161 Create3dOutputSurfaceAndResourceProvider();
161 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( 162 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create(
162 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_, 163 base::ThreadTaskRunnerHandle::Get().get(), &task_graph_runner_,
163 context_provider_.get(), resource_provider_.get(), false, 0); 164 context_provider_.get(), resource_provider_.get(), false, 0);
164 break; 165 break;
165 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: 166 case TILE_TASK_WORKER_POOL_TYPE_BITMAP:
166 CreateSoftwareOutputSurfaceAndResourceProvider(); 167 CreateSoftwareOutputSurfaceAndResourceProvider();
167 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( 168 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create(
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 370
370 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, 371 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests,
371 TileTaskWorkerPoolTest, 372 TileTaskWorkerPoolTest,
372 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 373 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
373 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 374 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
374 TILE_TASK_WORKER_POOL_TYPE_GPU, 375 TILE_TASK_WORKER_POOL_TYPE_GPU,
375 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 376 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
376 377
377 } // namespace 378 } // namespace
378 } // namespace cc 379 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task_worker_pool_perftest.cc ('k') | cc/raster/zero_copy_tile_task_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698