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

Unified Diff: src/core/SkXfermode.cpp

Issue 1055123002: New names for SkPMFloat methods. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: one more Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPMFloat.h ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkXfermode.cpp
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 2aaef70fb97c809296dd70fcca264fe4eac8151d..3048da2d097daf5efc05fa2aed8de02072865392 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -816,12 +816,12 @@ bool SkProcCoeffXfermode::isOpaque(SkXfermode::SrcColorOpacity opacityType) cons
if (CANNOT_USE_COEFF == fSrcCoeff) {
return false;
}
-
+
if (SkXfermode::kDA_Coeff == fSrcCoeff || SkXfermode::kDC_Coeff == fSrcCoeff ||
SkXfermode::kIDA_Coeff == fSrcCoeff || SkXfermode::kIDC_Coeff == fSrcCoeff) {
return false;
}
-
+
switch (fDstCoeff) {
case SkXfermode::kZero_Coeff:
return true;
@@ -1216,7 +1216,7 @@ static Sk4f clamp_255(const Sk4f& value) {
static inline SkPMFloat check_as_pmfloat(const Sk4f& value) {
SkPMFloat pm = value;
#ifdef SK_DEBUG
- (void)pm.get();
+ (void)pm.round();
#endif
return pm;
}
@@ -1298,11 +1298,11 @@ public:
static SkXfermode* Create(const ProcCoeff& rec) {
return SkNEW_ARGS(SkT4fXfermode, (rec));
}
-
+
void xfer32(SkPMColor dst[], const SkPMColor src[], int n, const SkAlpha aa[]) const override {
if (NULL == aa) {
while (n & 3) {
- *dst = ProcType::Xfer(SkPMFloat(*src++), SkPMFloat(*dst)).get();
+ *dst = ProcType::Xfer(SkPMFloat(*src++), SkPMFloat(*dst)).round();
dst++;
n -= 1;
}
@@ -1312,8 +1312,8 @@ public:
SkPMFloat::From4PMColors(src, &s0, &s1, &s2, &s3);
SkPMFloat d0, d1, d2, d3;
SkPMFloat::From4PMColors(dst, &d0, &d1, &d2, &d3);
- SkPMFloat::To4PMColors(ProcType::Xfer(s0, d0), ProcType::Xfer(s1, d1),
- ProcType::Xfer(s2, d2), ProcType::Xfer(s3, d3), dst);
+ SkPMFloat::RoundTo4PMColors(ProcType::Xfer(s0, d0), ProcType::Xfer(s1, d1),
+ ProcType::Xfer(s2, d2), ProcType::Xfer(s3, d3), dst);
src += 4;
dst += 4;
}
@@ -1329,14 +1329,14 @@ public:
} else {
res = ramp(dstF, ProcType::Xfer(srcF, dstF), aa4);
}
- dst[i] = SkPMFloat(res).get();
+ dst[i] = SkPMFloat(res).round();
}
}
}
-
+
private:
SkT4fXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, ProcType::kMode) {}
-
+
typedef SkProcCoeffXfermode INHERITED;
};
#endif
« no previous file with comments | « src/core/SkPMFloat.h ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698