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

Side by Side Diff: tests/GrPorterDuffTest.cpp

Issue 1656873002: fix for GrPorterDuffTest valgrind error (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | 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 #include "SkXfermode.h" 8 #include "SkXfermode.h"
9 #include "Test.h" 9 #include "Test.h"
10 10
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 kNone_GrColorComponentFlags, 1186 kNone_GrColorComponentFlags,
1187 kG_GrColorComponentFlag | kA_GrColorComponentFlag, 1187 kG_GrColorComponentFlag | kA_GrColorComponentFlag,
1188 kRGBA_GrColorComponentFlags 1188 kRGBA_GrColorComponentFlags
1189 }; 1189 };
1190 GR_STATIC_ASSERT(SK_ARRAY_COUNT(testColors) == SK_ARRAY_COUNT(testColorFlags )); 1190 GR_STATIC_ASSERT(SK_ARRAY_COUNT(testColors) == SK_ARRAY_COUNT(testColorFlags ));
1191 1191
1192 for (size_t c = 0; c < SK_ARRAY_COUNT(testColors); c++) { 1192 for (size_t c = 0; c < SK_ARRAY_COUNT(testColors); c++) {
1193 GrPipelineOptimizations optimizations; 1193 GrPipelineOptimizations optimizations;
1194 optimizations.fColorPOI.calcWithInitialValues(nullptr, 0, testColors[c], testColorFlags[c], 1194 optimizations.fColorPOI.calcWithInitialValues(nullptr, 0, testColors[c], testColorFlags[c],
1195 false); 1195 false);
1196 optimizations.fOverrides.fUsePLSDstRead = false;
1196 for (int f = 0; f <= 1; f++) { 1197 for (int f = 0; f <= 1; f++) {
1197 if (!f) { 1198 if (!f) {
1198 optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, 0, 1199 optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, 0,
1199 kNone_GrColorCo mponentFlags, true); 1200 kNone_GrColorCo mponentFlags, true);
1200 } else { 1201 } else {
1201 optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, GrC olorPackA4(255), 1202 optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, GrC olorPackA4(255),
1202 kRGBA_GrColorCo mponentFlags, true); 1203 kRGBA_GrColorCo mponentFlags, true);
1203 } 1204 }
1204 for (int m = 0; m <= SkXfermode::kLastCoeffMode; m++) { 1205 for (int m = 0; m <= SkXfermode::kLastCoeffMode; m++) {
1205 SkXfermode::Mode xfermode = static_cast<SkXfermode::Mode>(m); 1206 SkXfermode::Mode xfermode = static_cast<SkXfermode::Mode>(m);
(...skipping 10 matching lines...) Expand all
1216 xp->getOptimizations(optimizations, false, 0, caps); 1217 xp->getOptimizations(optimizations, false, 0, caps);
1217 TEST_ASSERT(!xp->hasSecondaryOutput()); 1218 TEST_ASSERT(!xp->hasSecondaryOutput());
1218 } 1219 }
1219 } 1220 }
1220 } 1221 }
1221 ctx->getGpu()->deleteTestingOnlyBackendTexture(backendTex); 1222 ctx->getGpu()->deleteTestingOnlyBackendTexture(backendTex);
1222 } 1223 }
1223 1224
1224 #endif 1225 #endif
1225 1226
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698