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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_proxy.h ('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"
11 #include "cc/resources/pixel_buffer_raster_worker_pool.h" 11 #include "cc/resources/pixel_buffer_raster_worker_pool.h"
12 #include "cc/resources/raster_worker_pool.h" 12 #include "cc/resources/raster_worker_pool.h"
13 #include "cc/resources/resource_pool.h" 13 #include "cc/resources/resource_pool.h"
14 #include "cc/resources/zero_copy_raster_worker_pool.h" 14 #include "cc/resources/zero_copy_raster_worker_pool.h"
15 #include "cc/test/fake_output_surface.h" 15 #include "cc/test/fake_output_surface.h"
16 #include "gpu/GLES2/gl2extchromium.h" 16 #include "gpu/GLES2/gl2extchromium.h"
17 17
18 namespace cc { 18 namespace cc {
19 19
20 namespace { 20 namespace {
21 21
22 bool IsTestCaseSupported(PixelResourceTestCase test_case) { 22 bool IsTestCaseSupported(PixelResourceTestCase test_case) {
23 switch (test_case) { 23 switch (test_case) {
24 case SOFTWARE: 24 case SOFTWARE:
25 case GL_GPU_RASTER_2D_DRAW: 25 case GL_GPU_RASTER_2D_DRAW:
26 case GL_ZERO_COPY_2D_DRAW: 26 case GL_ZERO_COPY_2D_DRAW:
27 case GL_ZERO_COPY_RECT_DRAW: 27 case GL_ZERO_COPY_RECT_DRAW:
28 case GL_ONE_COPY_2D_STAGING_2D_DRAW: 28 case GL_ONE_COPY_2D_STAGING_2D_DRAW:
29 case GL_ONE_COPY_RECT_STAGING_2D_DRAW:
29 case GL_ASYNC_UPLOAD_2D_DRAW: 30 case GL_ASYNC_UPLOAD_2D_DRAW:
30 return true; 31 return true;
31 case GL_ZERO_COPY_EXTERNAL_DRAW: 32 case GL_ZERO_COPY_EXTERNAL_DRAW:
32 case GL_ONE_COPY_RECT_STAGING_2D_DRAW:
33 case GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW: 33 case GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW:
34 // These should all be enabled in practice. 34 // These should all be enabled in practice.
35 // TODO(reveman): one copy with rect not supported in unit tests yet.
36 // TODO(enne): look into getting texture external oes enabled. 35 // TODO(enne): look into getting texture external oes enabled.
37 return false; 36 return false;
38 } 37 }
39 38
40 NOTREACHED(); 39 NOTREACHED();
41 return false; 40 return false;
42 } 41 }
43 42
44 } // namespace 43 } // namespace
45 44
(...skipping 23 matching lines...) Expand all
69 return; 68 return;
70 case GL_ONE_COPY_2D_STAGING_2D_DRAW: 69 case GL_ONE_COPY_2D_STAGING_2D_DRAW:
71 test_type_ = PIXEL_TEST_GL; 70 test_type_ = PIXEL_TEST_GL;
72 staging_texture_target_ = GL_TEXTURE_2D; 71 staging_texture_target_ = GL_TEXTURE_2D;
73 draw_texture_target_ = GL_TEXTURE_2D; 72 draw_texture_target_ = GL_TEXTURE_2D;
74 resource_pool_option_ = ONE_COPY_RASTER_WORKER_POOL; 73 resource_pool_option_ = ONE_COPY_RASTER_WORKER_POOL;
75 return; 74 return;
76 case GL_ONE_COPY_RECT_STAGING_2D_DRAW: 75 case GL_ONE_COPY_RECT_STAGING_2D_DRAW:
77 test_type_ = PIXEL_TEST_GL; 76 test_type_ = PIXEL_TEST_GL;
78 staging_texture_target_ = GL_TEXTURE_RECTANGLE_ARB; 77 staging_texture_target_ = GL_TEXTURE_RECTANGLE_ARB;
79 draw_texture_target_ = GL_TEXTURE_RECTANGLE_ARB; 78 draw_texture_target_ = GL_TEXTURE_2D;
80 resource_pool_option_ = ONE_COPY_RASTER_WORKER_POOL; 79 resource_pool_option_ = ONE_COPY_RASTER_WORKER_POOL;
81 return; 80 return;
82 case GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW: 81 case GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW:
83 test_type_ = PIXEL_TEST_GL; 82 test_type_ = PIXEL_TEST_GL;
84 staging_texture_target_ = GL_TEXTURE_EXTERNAL_OES; 83 staging_texture_target_ = GL_TEXTURE_EXTERNAL_OES;
85 draw_texture_target_ = GL_TEXTURE_2D; 84 draw_texture_target_ = GL_TEXTURE_2D;
86 resource_pool_option_ = ONE_COPY_RASTER_WORKER_POOL; 85 resource_pool_option_ = ONE_COPY_RASTER_WORKER_POOL;
87 return; 86 return;
88 case GL_ZERO_COPY_2D_DRAW: 87 case GL_ZERO_COPY_2D_DRAW:
89 test_type_ = PIXEL_TEST_GL; 88 test_type_ = PIXEL_TEST_GL;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (!IsTestCaseSupported(test_case_)) 215 if (!IsTestCaseSupported(test_case_))
217 return; 216 return;
218 RunPixelTest(test_type_, content_root, file_name); 217 RunPixelTest(test_type_, content_root, file_name);
219 } 218 }
220 219
221 ParameterizedPixelResourceTest::ParameterizedPixelResourceTest() 220 ParameterizedPixelResourceTest::ParameterizedPixelResourceTest()
222 : LayerTreeHostPixelResourceTest(GetParam()) { 221 : LayerTreeHostPixelResourceTest(GetParam()) {
223 } 222 }
224 223
225 } // namespace cc 224 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_proxy.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698