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

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

Issue 796663002: Update from https://crrev.com/307758 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Updates for SkCanvas::NewRaster deprecation 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/output/software_output_device.cc ('k') | cc/test/layer_tree_pixel_resource_test.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 #ifndef CC_TEST_LAYER_TREE_PIXEL_RESOURCE_TEST_H_ 5 #ifndef CC_TEST_LAYER_TREE_PIXEL_RESOURCE_TEST_H_
6 #define CC_TEST_LAYER_TREE_PIXEL_RESOURCE_TEST_H_ 6 #define CC_TEST_LAYER_TREE_PIXEL_RESOURCE_TEST_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "cc/test/layer_tree_pixel_test.h" 9 #include "cc/test/layer_tree_pixel_test.h"
10 10
(...skipping 15 matching lines...) Expand all
26 GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW, 26 GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW,
27 GL_ZERO_COPY_2D_DRAW, 27 GL_ZERO_COPY_2D_DRAW,
28 GL_ZERO_COPY_RECT_DRAW, 28 GL_ZERO_COPY_RECT_DRAW,
29 GL_ZERO_COPY_EXTERNAL_DRAW, 29 GL_ZERO_COPY_EXTERNAL_DRAW,
30 GL_ASYNC_UPLOAD_2D_DRAW, 30 GL_ASYNC_UPLOAD_2D_DRAW,
31 }; 31 };
32 32
33 class LayerTreeHostPixelResourceTest : public LayerTreePixelTest { 33 class LayerTreeHostPixelResourceTest : public LayerTreePixelTest {
34 public: 34 public:
35 explicit LayerTreeHostPixelResourceTest(PixelResourceTestCase test_case); 35 explicit LayerTreeHostPixelResourceTest(PixelResourceTestCase test_case);
36 LayerTreeHostPixelResourceTest();
36 37
37 void CreateResourceAndTileTaskWorkerPool( 38 void CreateResourceAndTileTaskWorkerPool(
38 LayerTreeHostImpl* host_impl, 39 LayerTreeHostImpl* host_impl,
39 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 40 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
40 scoped_ptr<ResourcePool>* resource_pool, 41 scoped_ptr<ResourcePool>* resource_pool,
41 scoped_ptr<ResourcePool>* staging_resource_pool) override; 42 scoped_ptr<ResourcePool>* staging_resource_pool) override;
42 43
43 void RunPixelResourceTest(scoped_refptr<Layer> content_root, 44 void RunPixelResourceTest(scoped_refptr<Layer> content_root,
44 base::FilePath file_name); 45 base::FilePath file_name);
45 46
46 enum TileTaskWorkerPoolOption { 47 enum TileTaskWorkerPoolOption {
47 BITMAP_TILE_TASK_WORKER_POOL, 48 BITMAP_TILE_TASK_WORKER_POOL,
48 GPU_TILE_TASK_WORKER_POOL, 49 GPU_TILE_TASK_WORKER_POOL,
49 ZERO_COPY_TILE_TASK_WORKER_POOL, 50 ZERO_COPY_TILE_TASK_WORKER_POOL,
50 ONE_COPY_TILE_TASK_WORKER_POOL, 51 ONE_COPY_TILE_TASK_WORKER_POOL,
51 PIXEL_BUFFER_TILE_TASK_WORKER_POOL, 52 PIXEL_BUFFER_TILE_TASK_WORKER_POOL,
52 }; 53 };
53 54
54 protected: 55 protected:
55 unsigned staging_texture_target_; 56 unsigned staging_texture_target_;
56 unsigned draw_texture_target_; 57 unsigned draw_texture_target_;
57 TileTaskWorkerPoolOption resource_pool_option_; 58 TileTaskWorkerPoolOption resource_pool_option_;
59 bool initialized_;
60
61 void InitializeFromTestCase(PixelResourceTestCase test_case);
58 62
59 private: 63 private:
60 void InitializeFromTestCase(PixelResourceTestCase test_case);
61
62 PixelResourceTestCase test_case_; 64 PixelResourceTestCase test_case_;
63 }; 65 };
64 66
65 #define INSTANTIATE_PIXEL_RESOURCE_TEST_CASE_P(framework_name) \ 67 #define INSTANTIATE_PIXEL_RESOURCE_TEST_CASE_P(framework_name) \
66 INSTANTIATE_TEST_CASE_P( \ 68 INSTANTIATE_TEST_CASE_P( \
67 PixelResourceTest, \ 69 PixelResourceTest, \
68 framework_name, \ 70 framework_name, \
69 ::testing::Values(SOFTWARE, \ 71 ::testing::Values(SOFTWARE, \
70 GL_GPU_RASTER_2D_DRAW, \ 72 GL_GPU_RASTER_2D_DRAW, \
71 GL_ONE_COPY_2D_STAGING_2D_DRAW, \ 73 GL_ONE_COPY_2D_STAGING_2D_DRAW, \
72 GL_ONE_COPY_RECT_STAGING_2D_DRAW, \ 74 GL_ONE_COPY_RECT_STAGING_2D_DRAW, \
73 GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW, \ 75 GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW, \
74 GL_ZERO_COPY_2D_DRAW, \ 76 GL_ZERO_COPY_2D_DRAW, \
75 GL_ZERO_COPY_RECT_DRAW, \ 77 GL_ZERO_COPY_RECT_DRAW, \
76 GL_ZERO_COPY_EXTERNAL_DRAW, \ 78 GL_ZERO_COPY_EXTERNAL_DRAW, \
77 GL_ASYNC_UPLOAD_2D_DRAW)) 79 GL_ASYNC_UPLOAD_2D_DRAW))
78 80
79 class ParameterizedPixelResourceTest 81 class ParameterizedPixelResourceTest
80 : public LayerTreeHostPixelResourceTest, 82 : public LayerTreeHostPixelResourceTest,
81 public ::testing::WithParamInterface<PixelResourceTestCase> { 83 public ::testing::WithParamInterface<PixelResourceTestCase> {
82 public: 84 public:
83 ParameterizedPixelResourceTest(); 85 ParameterizedPixelResourceTest();
84 }; 86 };
85 87
86 } // namespace cc 88 } // namespace cc
87 89
88 #endif // CC_TEST_LAYER_TREE_PIXEL_RESOURCE_TEST_H_ 90 #endif // CC_TEST_LAYER_TREE_PIXEL_RESOURCE_TEST_H_
OLDNEW
« no previous file with comments | « cc/output/software_output_device.cc ('k') | cc/test/layer_tree_pixel_resource_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698