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" |
11 | 11 |
12 #if SK_SUPPORT_GPU && SK_ALLOW_STATIC_GLOBAL_INITIALIZERS && defined(SK_VULKAN) | 12 #if SK_SUPPORT_GPU && SK_ALLOW_STATIC_GLOBAL_INITIALIZERS && defined(SK_VULKAN) |
13 | 13 |
14 #include "GrContextFactory.h" | 14 #include "GrContextFactory.h" |
15 #include "GrTest.h" | 15 #include "GrTest.h" |
16 #include "Test.h" | 16 #include "Test.h" |
17 #include "vk/GrVkGpu.h" | 17 #include "vk/GrVkGpu.h" |
18 | 18 |
| 19 using sk_gpu_test::GrContextFactory; |
| 20 |
19 bool does_full_buffer_contain_correct_color(GrColor* buffer, | 21 bool does_full_buffer_contain_correct_color(GrColor* buffer, |
20 GrColor clearColor, | 22 GrColor clearColor, |
21 GrPixelConfig config, | 23 GrPixelConfig config, |
22 int width, | 24 int width, |
23 int height) { | 25 int height) { |
24 GrColor matchColor; | 26 GrColor matchColor; |
25 if (kRGBA_8888_GrPixelConfig == config) { | 27 if (kRGBA_8888_GrPixelConfig == config) { |
26 matchColor = clearColor; | 28 matchColor = clearColor; |
27 } else if (kBGRA_8888_GrPixelConfig) { | 29 } else if (kBGRA_8888_GrPixelConfig) { |
28 // Hack to flip the R, B componets in the GrColor so that the comparriso
n will work below | 30 // Hack to flip the R, B componets in the GrColor so that the comparriso
n will work below |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 basic_clear_test(reporter, context, kRGBA_8888_GrPixelConfig); | 210 basic_clear_test(reporter, context, kRGBA_8888_GrPixelConfig); |
209 basic_clear_test(reporter, context, kBGRA_8888_GrPixelConfig); | 211 basic_clear_test(reporter, context, kBGRA_8888_GrPixelConfig); |
210 sub_clear_test(reporter, context, kRGBA_8888_GrPixelConfig); | 212 sub_clear_test(reporter, context, kRGBA_8888_GrPixelConfig); |
211 sub_clear_test(reporter, context, kBGRA_8888_GrPixelConfig); | 213 sub_clear_test(reporter, context, kBGRA_8888_GrPixelConfig); |
212 } | 214 } |
213 | 215 |
214 } | 216 } |
215 } | 217 } |
216 | 218 |
217 #endif | 219 #endif |
OLD | NEW |