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

Side by Side Diff: cc/test/layer_tree_pixel_resource_test.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
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/tiles/tile_manager.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/layer_tree_pixel_resource_test.h" 5 #include "cc/test/layer_tree_pixel_resource_test.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "cc/raster/bitmap_tile_task_worker_pool.h" 8 #include "cc/raster/bitmap_tile_task_worker_pool.h"
9 #include "cc/raster/gpu_rasterizer.h" 9 #include "cc/raster/gpu_rasterizer.h"
10 #include "cc/raster/gpu_tile_task_worker_pool.h" 10 #include "cc/raster/gpu_tile_task_worker_pool.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 task_runner, task_graph_runner(), context_provider, resource_provider, 140 task_runner, task_graph_runner(), context_provider, resource_provider,
141 false, 0); 141 false, 0);
142 break; 142 break;
143 case ZERO_COPY_TILE_TASK_WORKER_POOL: 143 case ZERO_COPY_TILE_TASK_WORKER_POOL:
144 EXPECT_TRUE(context_provider); 144 EXPECT_TRUE(context_provider);
145 EXPECT_EQ(PIXEL_TEST_GL, test_type_); 145 EXPECT_EQ(PIXEL_TEST_GL, test_type_);
146 EXPECT_TRUE(host_impl->GetRendererCapabilities().using_image); 146 EXPECT_TRUE(host_impl->GetRendererCapabilities().using_image);
147 *resource_pool = ResourcePool::Create(resource_provider, task_runner); 147 *resource_pool = ResourcePool::Create(resource_provider, task_runner);
148 148
149 *tile_task_worker_pool = ZeroCopyTileTaskWorkerPool::Create( 149 *tile_task_worker_pool = ZeroCopyTileTaskWorkerPool::Create(
150 task_runner, task_graph_runner(), resource_provider, false); 150 task_runner, task_graph_runner(), resource_provider,
151 PlatformColor::BestTextureFormat());
151 break; 152 break;
152 case ONE_COPY_TILE_TASK_WORKER_POOL: 153 case ONE_COPY_TILE_TASK_WORKER_POOL:
153 EXPECT_TRUE(context_provider); 154 EXPECT_TRUE(context_provider);
154 EXPECT_EQ(PIXEL_TEST_GL, test_type_); 155 EXPECT_EQ(PIXEL_TEST_GL, test_type_);
155 EXPECT_TRUE(host_impl->GetRendererCapabilities().using_image); 156 EXPECT_TRUE(host_impl->GetRendererCapabilities().using_image);
156 *resource_pool = ResourcePool::Create(resource_provider, task_runner); 157 *resource_pool = ResourcePool::Create(resource_provider, task_runner);
157 158
158 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create( 159 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create(
159 task_runner, task_graph_runner(), context_provider, resource_provider, 160 task_runner, task_graph_runner(), context_provider, resource_provider,
160 max_bytes_per_copy_operation, false, 161 max_bytes_per_copy_operation, false,
161 max_staging_buffer_usage_in_bytes, false); 162 max_staging_buffer_usage_in_bytes,
163 PlatformColor::BestTextureFormat());
162 break; 164 break;
163 } 165 }
164 } 166 }
165 167
166 void LayerTreeHostPixelResourceTest::RunPixelResourceTest( 168 void LayerTreeHostPixelResourceTest::RunPixelResourceTest(
167 scoped_refptr<Layer> content_root, 169 scoped_refptr<Layer> content_root,
168 base::FilePath file_name) { 170 base::FilePath file_name) {
169 if (!IsTestCaseSupported(test_case_)) 171 if (!IsTestCaseSupported(test_case_))
170 return; 172 return;
171 RunPixelTest(test_type_, content_root, file_name); 173 RunPixelTest(test_type_, content_root, file_name);
172 } 174 }
173 175
174 ParameterizedPixelResourceTest::ParameterizedPixelResourceTest() 176 ParameterizedPixelResourceTest::ParameterizedPixelResourceTest()
175 : LayerTreeHostPixelResourceTest(GetParam()) { 177 : LayerTreeHostPixelResourceTest(GetParam()) {
176 } 178 }
177 179
178 } // namespace cc 180 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698