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

Unified Diff: src/core/SkXfermode.cpp

Issue 1685203002: lots of sRGB and F16 blits (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use SkAutoTMalloc 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkSpriteBlitter_ARGB32.cpp ('k') | src/core/SkXfermode4f.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 07c4e168b97420b141000c4d523a60ea622355c0..1d8f3d92bfc6c855f7b00bee2fa3038ba2bdc1c7 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -95,7 +95,7 @@ static Sk4f overlay_4f(const Sk4f& s, const Sk4f& d) {
Sk4f two = Sk4f(2);
Sk4f rc = (two * d <= da).thenElse(two * s * d,
sa * da - two * (da - d) * (sa - s));
- return s + d - s * da + color_alpha(rc - d * sa, 0);
+ return pin_1(s + d - s * da + color_alpha(rc - d * sa, 0));
}
static Sk4f hardlight_4f(const Sk4f& s, const Sk4f& d) {
@@ -1343,6 +1343,15 @@ SkXfermodeProc4f SkXfermode::GetProc4f(Mode mode) {
return proc;
}
+static SkPM4f missing_proc4f(const SkPM4f& src, const SkPM4f& dst) {
+ return src;
+}
+
+SkXfermodeProc4f SkXfermode::getProc4f() const {
+ Mode mode;
+ return this->asMode(&mode) ? GetProc4f(mode) : missing_proc4f;
+}
+
bool SkXfermode::ModeAsCoeff(Mode mode, Coeff* src, Coeff* dst) {
SkASSERT(SK_ARRAY_COUNT(gProcCoeffs) == kModeCount);
« no previous file with comments | « src/core/SkSpriteBlitter_ARGB32.cpp ('k') | src/core/SkXfermode4f.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698