OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 // This is a GPU-backend specific test. It relies on static intializers to work | 8 // This is a GPU-backend specific test. It relies on static intializers to work |
9 | 9 |
10 #include "SkTypes.h" | 10 #include "SkTypes.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 config, | 126 config, |
127 4, | 127 4, |
128 5)); | 128 5)); |
129 | 129 |
130 tex1->unref(); | 130 tex1->unref(); |
131 } else { | 131 } else { |
132 REPORTER_ASSERT(reporter, !canCreate); | 132 REPORTER_ASSERT(reporter, !canCreate); |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 DEF_GPUTEST(VkUploadPixelsTests, reporter, factory) { | 136 DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkUploadPixelsTests, reporter, ctxInfo) { |
137 GrContextOptions opts; | 137 basic_texture_test(reporter, ctxInfo.fGrContext, kRGBA_8888_GrPixelConfig, f
alse, false); |
138 opts.fSuppressPrints = true; | 138 basic_texture_test(reporter, ctxInfo.fGrContext, kRGBA_8888_GrPixelConfig, t
rue, false); |
139 GrContextFactory debugFactory(opts); | 139 basic_texture_test(reporter, ctxInfo.fGrContext, kRGBA_8888_GrPixelConfig, f
alse, true); |
140 for (int type = 0; type < GrContextFactory::kContextTypeCnt; ++type) { | 140 basic_texture_test(reporter, ctxInfo.fGrContext, kRGBA_8888_GrPixelConfig, t
rue, true); |
141 if (static_cast<GrContextFactory::ContextType>(type) != | 141 basic_texture_test(reporter, ctxInfo.fGrContext, kBGRA_8888_GrPixelConfig, f
alse, false); |
142 GrContextFactory::kNativeGL_ContextType) { | 142 basic_texture_test(reporter, ctxInfo.fGrContext, kBGRA_8888_GrPixelConfig, t
rue, false); |
143 continue; | 143 basic_texture_test(reporter, ctxInfo.fGrContext, kBGRA_8888_GrPixelConfig, f
alse, true); |
144 } | 144 basic_texture_test(reporter, ctxInfo.fGrContext, kBGRA_8888_GrPixelConfig, t
rue, true); |
145 GrContext* context = debugFactory.get(static_cast<GrContextFactory::Cont
extType>(type)); | |
146 if (context) { | |
147 basic_texture_test(reporter, context, kRGBA_8888_GrPixelConfig, fals
e, false); | |
148 basic_texture_test(reporter, context, kRGBA_8888_GrPixelConfig, true
, false); | |
149 basic_texture_test(reporter, context, kRGBA_8888_GrPixelConfig, fals
e, true); | |
150 basic_texture_test(reporter, context, kRGBA_8888_GrPixelConfig, true
, true); | |
151 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, fals
e, false); | |
152 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, true
, false); | |
153 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, fals
e, true); | |
154 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, true
, true); | |
155 } | |
156 | |
157 } | |
158 } | 145 } |
159 | 146 |
160 #endif | 147 #endif |
OLD | NEW |