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 #include <initializer_list> | 8 #include <initializer_list> |
9 #include "Test.h" | 9 #include "Test.h" |
10 | 10 |
11 #if SK_SUPPORT_GPU | 11 #if SK_SUPPORT_GPU |
12 #include "GrContext.h" | 12 #include "GrContext.h" |
13 #include "GrTexture.h" | 13 #include "GrTexture.h" |
14 #include "GrTextureProvider.h" | 14 #include "GrTextureProvider.h" |
15 | 15 |
16 #include "SkUtils.h" | 16 #include "SkUtils.h" |
17 | 17 |
18 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(CopySurface, reporter, context) { | 18 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(CopySurface, reporter, ctxInfo) { |
| 19 GrContext* context = ctxInfo.fGrContext; |
19 static const int kW = 10; | 20 static const int kW = 10; |
20 static const int kH = 10; | 21 static const int kH = 10; |
21 static const size_t kRowBytes = sizeof(uint32_t) * kW; | 22 static const size_t kRowBytes = sizeof(uint32_t) * kW; |
22 | 23 |
23 GrSurfaceDesc baseDesc; | 24 GrSurfaceDesc baseDesc; |
24 baseDesc.fConfig = kRGBA_8888_GrPixelConfig; | 25 baseDesc.fConfig = kRGBA_8888_GrPixelConfig; |
25 baseDesc.fWidth = kW; | 26 baseDesc.fWidth = kW; |
26 baseDesc.fHeight = kH; | 27 baseDesc.fHeight = kH; |
27 | 28 |
28 SkAutoTMalloc<uint32_t> srcPixels(kW * kH); | 29 SkAutoTMalloc<uint32_t> srcPixels(kW * kH); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 155 } |
155 } | 156 } |
156 } | 157 } |
157 } | 158 } |
158 } | 159 } |
159 } | 160 } |
160 } | 161 } |
161 } | 162 } |
162 } | 163 } |
163 #endif | 164 #endif |
OLD | NEW |