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

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

Issue 2507963003: Pass correct texture hint for GPU raster (Closed)
Patch Set: rebase Created 4 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_picture_layer_tiling_client.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 enum RasterBufferProviderType { 45 enum RasterBufferProviderType {
46 RASTER_BUFFER_PROVIDER_TYPE_ZERO_COPY, 46 RASTER_BUFFER_PROVIDER_TYPE_ZERO_COPY,
47 RASTER_BUFFER_PROVIDER_TYPE_ONE_COPY, 47 RASTER_BUFFER_PROVIDER_TYPE_ONE_COPY,
48 RASTER_BUFFER_PROVIDER_TYPE_GPU, 48 RASTER_BUFFER_PROVIDER_TYPE_GPU,
49 RASTER_BUFFER_PROVIDER_TYPE_BITMAP 49 RASTER_BUFFER_PROVIDER_TYPE_BITMAP
50 }; 50 };
51 51
52 protected: 52 protected:
53 unsigned draw_texture_target_; 53 unsigned draw_texture_target_;
54 RasterBufferProviderType raster_buffer_provider_type_; 54 RasterBufferProviderType raster_buffer_provider_type_;
55 ResourceProvider::TextureHint texture_hint_;
55 bool initialized_; 56 bool initialized_;
56 57
57 void InitializeFromTestCase(PixelResourceTestCase test_case); 58 void InitializeFromTestCase(PixelResourceTestCase test_case);
58 59
59 private: 60 private:
60 PixelResourceTestCase test_case_; 61 PixelResourceTestCase test_case_;
61 }; 62 };
62 63
63 #define INSTANTIATE_PIXEL_RESOURCE_TEST_CASE_P(framework_name) \ 64 #define INSTANTIATE_PIXEL_RESOURCE_TEST_CASE_P(framework_name) \
64 INSTANTIATE_TEST_CASE_P( \ 65 INSTANTIATE_TEST_CASE_P( \
65 PixelResourceTest, framework_name, \ 66 PixelResourceTest, framework_name, \
66 ::testing::Values( \ 67 ::testing::Values( \
67 SOFTWARE, GL_GPU_RASTER_2D_DRAW, GL_ONE_COPY_2D_STAGING_2D_DRAW, \ 68 SOFTWARE, GL_GPU_RASTER_2D_DRAW, GL_ONE_COPY_2D_STAGING_2D_DRAW, \
68 GL_ONE_COPY_RECT_STAGING_2D_DRAW, \ 69 GL_ONE_COPY_RECT_STAGING_2D_DRAW, \
69 GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW, GL_ZERO_COPY_2D_DRAW, \ 70 GL_ONE_COPY_EXTERNAL_STAGING_2D_DRAW, GL_ZERO_COPY_2D_DRAW, \
70 GL_ZERO_COPY_RECT_DRAW, GL_ZERO_COPY_EXTERNAL_DRAW)) 71 GL_ZERO_COPY_RECT_DRAW, GL_ZERO_COPY_EXTERNAL_DRAW))
71 72
72 class ParameterizedPixelResourceTest 73 class ParameterizedPixelResourceTest
73 : public LayerTreeHostPixelResourceTest, 74 : public LayerTreeHostPixelResourceTest,
74 public ::testing::WithParamInterface<PixelResourceTestCase> { 75 public ::testing::WithParamInterface<PixelResourceTestCase> {
75 public: 76 public:
76 ParameterizedPixelResourceTest(); 77 ParameterizedPixelResourceTest();
77 }; 78 };
78 79
79 } // namespace cc 80 } // namespace cc
80 81
81 #endif // CC_TEST_LAYER_TREE_PIXEL_RESOURCE_TEST_H_ 82 #endif // CC_TEST_LAYER_TREE_PIXEL_RESOURCE_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.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