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

Side by Side Diff: tests/GrGetCoeffBlendKnownComponentsTest.cpp

Issue 1397123002: Move functions from SkGr to SkGrPriv.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 9th time's a charm? Created 5 years, 2 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 | « src/views/SkWindow.cpp ('k') | tools/VisualBench/VisualBench.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 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 "Test.h" 8 #include "Test.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
11 11
12 #include "GrBlend.h" 12 #include "GrBlend.h"
13 #include "SkGr.h" 13 #include "SkGr.h"
14 #include "SkGrPriv.h"
14 #include "SkRandom.h" 15 #include "SkRandom.h"
15 #include "SkXfermode.h" 16 #include "SkXfermode.h"
16 17
17 static GrColor make_baseline_color(GrColor src, GrColor dst, const SkXfermode* x m) { 18 static GrColor make_baseline_color(GrColor src, GrColor dst, const SkXfermode* x m) {
18 SkPMColor skSrc = GrColorToSkPMColor(src); 19 SkPMColor skSrc = GrColorToSkPMColor(src);
19 SkPMColor skDst = GrColorToSkPMColor(dst); 20 SkPMColor skDst = GrColorToSkPMColor(dst);
20 if (xm) { 21 if (xm) {
21 xm->xfer32(&skDst, &skSrc, 1, nullptr); 22 xm->xfer32(&skDst, &skSrc, 1, nullptr);
22 } else { 23 } else {
23 // null means src-over 24 // null means src-over
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 kOne_GrBlendCoeff, kISA_GrBlendCoeff, 94 kOne_GrBlendCoeff, kISA_GrBlendCoeff,
94 0xFF808080, (kG_GrColorComponentFlag | kB_GrColorComponentFlag | kA_GrCo lorComponentFlag), 95 0xFF808080, (kG_GrColorComponentFlag | kB_GrColorComponentFlag | kA_GrCo lorComponentFlag),
95 0xFF606060, kRGBA_GrColorComponentFlags, 96 0xFF606060, kRGBA_GrColorComponentFlags,
96 &outColor, &outFlags); 97 &outColor, &outFlags);
97 REPORTER_ASSERT(reporter, 98 REPORTER_ASSERT(reporter,
98 (kG_GrColorComponentFlag | kB_GrColorComponentFlag | kA_GrCo lorComponentFlag) == outFlags && 99 (kG_GrColorComponentFlag | kB_GrColorComponentFlag | kA_GrCo lorComponentFlag) == outFlags &&
99 (outColor & 0xFFFFFF00) == 0xFF808000); 100 (outColor & 0xFFFFFF00) == 0xFF808000);
100 } 101 }
101 102
102 #endif 103 #endif
OLDNEW
« no previous file with comments | « src/views/SkWindow.cpp ('k') | tools/VisualBench/VisualBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698