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

Side by Side Diff: tests/ReadWriteAlphaTest.cpp

Issue 2103133002: Enable many more tests for Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@unitTests3
Patch Set: Created 4 years, 5 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/ProxyTest.cpp ('k') | tests/SRGBReadWritePixelsTest.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 2012 Google Inc. 2 * Copyright 2012 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 "Test.h" 8 #include "Test.h"
9 9
10 // This test is specific to the GPU backend. 10 // This test is specific to the GPU backend.
(...skipping 16 matching lines...) Expand all
27 if (e != a) { 27 if (e != a) {
28 ERRORF(reporter, 28 ERRORF(reporter,
29 "Failed alpha readback. Expected: 0x%02x, Got: 0x%02x at (%d,%d), %s", 29 "Failed alpha readback. Expected: 0x%02x, Got: 0x%02x at (%d,%d), %s",
30 e, a, x, y, extraMsg.c_str()); 30 e, a, x, y, extraMsg.c_str());
31 return; 31 return;
32 } 32 }
33 } 33 }
34 } 34 }
35 } 35 }
36 36
37 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { 37 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) {
38 unsigned char alphaData[X_SIZE * Y_SIZE]; 38 unsigned char alphaData[X_SIZE * Y_SIZE];
39 39
40 static const int kClearValue = 0x2; 40 static const int kClearValue = 0x2;
41 41
42 bool match; 42 bool match;
43 static const size_t kRowBytes[] = {0, X_SIZE, X_SIZE + 1, 2 * X_SIZE - 1}; 43 static const size_t kRowBytes[] = {0, X_SIZE, X_SIZE + 1, 2 * X_SIZE - 1};
44 for (int rt = 0; rt < 2; ++rt) { 44 for (int rt = 0; rt < 2; ++rt) {
45 GrSurfaceDesc desc; 45 GrSurfaceDesc desc;
46 // let Skia know we will be using this texture as a render target 46 // let Skia know we will be using this texture as a render target
47 desc.fFlags = rt ? kRenderTarget_GrSurfaceFlag : kNone_GrSurfaceFlag s; 47 desc.fFlags = rt ? kRenderTarget_GrSurfaceFlag : kNone_GrSurfaceFlag s;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 SkString msg; 182 SkString msg;
183 msg.printf("rt:%d, rb:%d 8888", rt, SkToU32(rowBytes)); 183 msg.printf("rt:%d, rb:%d 8888", rt, SkToU32(rowBytes));
184 validate_alpha_data(reporter, X_SIZE, Y_SIZE, readback.get(), no nZeroRowBytes, 184 validate_alpha_data(reporter, X_SIZE, Y_SIZE, readback.get(), no nZeroRowBytes,
185 alphaData, msg); 185 alphaData, msg);
186 } 186 }
187 } 187 }
188 } 188 }
189 } 189 }
190 190
191 #endif 191 #endif
OLDNEW
« no previous file with comments | « tests/ProxyTest.cpp ('k') | tests/SRGBReadWritePixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698