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

Side by Side Diff: cc/test/layer_tree_pixel_resource_test.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.cc ('k') | cc/test/layer_tree_test.h » ('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/resources/bitmap_raster_worker_pool.h" 8 #include "cc/resources/bitmap_raster_worker_pool.h"
9 #include "cc/resources/gpu_raster_worker_pool.h" 9 #include "cc/resources/gpu_raster_worker_pool.h"
10 #include "cc/resources/one_copy_raster_worker_pool.h" 10 #include "cc/resources/one_copy_raster_worker_pool.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 *raster_worker_pool = 153 *raster_worker_pool =
154 GpuRasterWorkerPool::Create(task_runner, 154 GpuRasterWorkerPool::Create(task_runner,
155 context_provider, 155 context_provider,
156 resource_provider, 156 resource_provider,
157 use_distance_field_text); 157 use_distance_field_text);
158 break; 158 break;
159 case ZERO_COPY_RASTER_WORKER_POOL: 159 case ZERO_COPY_RASTER_WORKER_POOL:
160 EXPECT_TRUE(context_provider); 160 EXPECT_TRUE(context_provider);
161 EXPECT_EQ(PIXEL_TEST_GL, test_type_); 161 EXPECT_EQ(PIXEL_TEST_GL, test_type_);
162 EXPECT_TRUE(host_impl->CanUseZeroCopyRasterizer()); 162 EXPECT_TRUE(host_impl->GetRendererCapabilities().using_image);
163 *resource_pool = 163 *resource_pool =
164 ResourcePool::Create(resource_provider, 164 ResourcePool::Create(resource_provider,
165 draw_texture_target_, 165 draw_texture_target_,
166 resource_provider->best_texture_format()); 166 resource_provider->best_texture_format());
167 167
168 *raster_worker_pool = ZeroCopyRasterWorkerPool::Create( 168 *raster_worker_pool = ZeroCopyRasterWorkerPool::Create(
169 task_runner, 169 task_runner,
170 RasterWorkerPool::GetTaskGraphRunner(), 170 RasterWorkerPool::GetTaskGraphRunner(),
171 resource_provider); 171 resource_provider);
172 break; 172 break;
173 case ONE_COPY_RASTER_WORKER_POOL: 173 case ONE_COPY_RASTER_WORKER_POOL:
174 EXPECT_TRUE(context_provider); 174 EXPECT_TRUE(context_provider);
175 EXPECT_EQ(PIXEL_TEST_GL, test_type_); 175 EXPECT_EQ(PIXEL_TEST_GL, test_type_);
176 EXPECT_TRUE(host_impl->CanUseOneCopyRasterizer()); 176 EXPECT_TRUE(host_impl->GetRendererCapabilities().using_image);
177 // We need to create a staging resource pool when using copy rasterizer. 177 // We need to create a staging resource pool when using copy rasterizer.
178 *staging_resource_pool = 178 *staging_resource_pool =
179 ResourcePool::Create(resource_provider, 179 ResourcePool::Create(resource_provider,
180 staging_texture_target_, 180 staging_texture_target_,
181 resource_provider->best_texture_format()); 181 resource_provider->best_texture_format());
182 *resource_pool = 182 *resource_pool =
183 ResourcePool::Create(resource_provider, 183 ResourcePool::Create(resource_provider,
184 draw_texture_target_, 184 draw_texture_target_,
185 resource_provider->best_texture_format()); 185 resource_provider->best_texture_format());
186 186
(...skipping 28 matching lines...) Expand all
215 if (!IsTestCaseSupported(test_case_)) 215 if (!IsTestCaseSupported(test_case_))
216 return; 216 return;
217 RunPixelTest(test_type_, content_root, file_name); 217 RunPixelTest(test_type_, content_root, file_name);
218 } 218 }
219 219
220 ParameterizedPixelResourceTest::ParameterizedPixelResourceTest() 220 ParameterizedPixelResourceTest::ParameterizedPixelResourceTest()
221 : LayerTreeHostPixelResourceTest(GetParam()) { 221 : LayerTreeHostPixelResourceTest(GetParam()) {
222 } 222 }
223 223
224 } // namespace cc 224 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.cc ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698