| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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/GrVkCaps.h" | 17 #include "vk/GrVkCaps.h" |
| 18 #include "vk/GrVkGpu.h" | 18 #include "vk/GrVkGpu.h" |
| 19 #include "vk/GrVkMemory.h" | 19 #include "vk/GrVkMemory.h" |
| 20 #include "vk/GrVkTypes.h" | 20 #include "vk/GrVkTypes.h" |
| 21 | 21 |
| 22 using sk_gpu_test::GrContextFactory; |
| 23 |
| 22 const int kW = 1024; | 24 const int kW = 1024; |
| 23 const int kH = 1024; | 25 const int kH = 1024; |
| 24 const GrPixelConfig kPixelConfig = kRGBA_8888_GrPixelConfig; | 26 const GrPixelConfig kPixelConfig = kRGBA_8888_GrPixelConfig; |
| 25 | 27 |
| 26 void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) { | 28 void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) { |
| 27 | 29 |
| 28 GrVkGpu* gpu = static_cast<GrVkGpu*>(context->getGpu()); | 30 GrVkGpu* gpu = static_cast<GrVkGpu*>(context->getGpu()); |
| 29 | 31 |
| 30 GrBackendObject backendObj = gpu->createTestingOnlyBackendTexture(nullptr, k
W, kH, kPixelConfig); | 32 GrBackendObject backendObj = gpu->createTestingOnlyBackendTexture(nullptr, k
W, kH, kPixelConfig); |
| 31 const GrVkTextureInfo* backendTex = reinterpret_cast<const GrVkTextureInfo*>
(backendObj); | 33 const GrVkTextureInfo* backendTex = reinterpret_cast<const GrVkTextureInfo*>
(backendObj); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 if (context) { | 171 if (context) { |
| 170 wrap_tex_test(reporter, context); | 172 wrap_tex_test(reporter, context); |
| 171 wrap_rt_test(reporter, context); | 173 wrap_rt_test(reporter, context); |
| 172 wrap_trt_test(reporter, context); | 174 wrap_trt_test(reporter, context); |
| 173 } | 175 } |
| 174 | 176 |
| 175 } | 177 } |
| 176 } | 178 } |
| 177 | 179 |
| 178 #endif | 180 #endif |
| OLD | NEW |