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

Side by Side Diff: tests/VkUploadPixelsTests.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 | « tests/VkClearTests.cpp ('k') | tests/VkWrapTests.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;
19 20
20 void fill_pixel_data(int width, int height, GrColor* data) { 21 void fill_pixel_data(int width, int height, GrColor* data) {
21 22
22 // build red-green gradient 23 // build red-green gradient
23 for (int j = 0; j < height; ++j) { 24 for (int j = 0; j < height; ++j) {
24 for (int i = 0; i < width; ++i) { 25 for (int i = 0; i < width; ++i) {
25 unsigned int red = (unsigned int)(256.f*(i / (float)width)); 26 unsigned int red = (unsigned int)(256.f*(i / (float)width));
26 unsigned int green = (unsigned int)(256.f*(j / (float)height)); 27 unsigned int green = (unsigned int)(256.f*(j / (float)height));
27 data[i + j*width] = GrColorPackRGBA(red - (red>>8), green - (green>> 8), 0xff, 0xff); 28 data[i + j*width] = GrColorPackRGBA(red - (red>>8), green - (green>> 8), 0xff, 0xff);
28 } 29 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, fals e, false); 151 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, fals e, false);
151 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, true , false); 152 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, true , false);
152 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, fals e, true); 153 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, fals e, true);
153 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, true , true); 154 basic_texture_test(reporter, context, kBGRA_8888_GrPixelConfig, true , true);
154 } 155 }
155 156
156 } 157 }
157 } 158 }
158 159
159 #endif 160 #endif
OLDNEW
« no previous file with comments | « tests/VkClearTests.cpp ('k') | tests/VkWrapTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698