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

Side by Side Diff: tests/VkClearTests.cpp

Issue 1844983003: Fix Vulkan tests after GrContextFactory move to sk_gpu_test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months 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 | « no previous file | tests/VkUploadPixelsTests.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | tests/VkUploadPixelsTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698