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

Side by Side Diff: tests/CopySurfaceTest.cpp

Issue 1860593002: One signature for creating unit tests that run on premade GrContexts (Closed) Base URL: https://skia.googlesource.com/skia.git@try_no_native
Patch Set: another guess to fix windows 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/ClipBoundsTest.cpp ('k') | tests/EGLImageTest.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 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
154 } 155 }
155 } 156 }
156 } 157 }
157 } 158 }
158 } 159 }
159 } 160 }
160 } 161 }
161 } 162 }
162 } 163 }
163 #endif 164 #endif
OLDNEW
« no previous file with comments | « tests/ClipBoundsTest.cpp ('k') | tests/EGLImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698