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

Unified Diff: src/effects/gradients/Sk4fGradientBase.cpp

Issue 1808963005: 4f linear gradient shader blitters (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « no previous file | src/effects/gradients/Sk4fGradientPriv.h » ('j') | src/effects/gradients/Sk4fGradientPriv.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/Sk4fGradientBase.cpp
diff --git a/src/effects/gradients/Sk4fGradientBase.cpp b/src/effects/gradients/Sk4fGradientBase.cpp
index a7298127907f38aff93a2af0c7dc3b8bd650980e..bc14e76233891acf81a6a7f9198f1b1e9ddfbc4e 100644
--- a/src/effects/gradients/Sk4fGradientBase.cpp
+++ b/src/effects/gradients/Sk4fGradientBase.cpp
@@ -334,7 +334,7 @@ GradientShaderBase4fContext::shadeSpanInternal(int x, int y,
this->mapTs(x, y, ts, n);
for (int i = 0; i < n; ++i) {
const Sk4f c = sampler.sample(ts[i]);
- store<DstType, do_premul>(c, dst++);
+ store<DstType, kLinear_SkColorProfileType, do_premul>(c, dst++);
}
x += n;
count -= n;
@@ -424,8 +424,8 @@ private:
}
void loadIntervalData(const Interval* i) {
- fCc = dst_swizzle<DstType>(i->fC0) * dst_component_scale<DstType>();
- fDc = dst_swizzle<DstType>(i->fDc) * dst_component_scale<DstType>();
+ fCc = scale_for_dest<DstType, kLinear_SkColorProfileType>(dst_swizzle<DstType>(i->fC0));
+ fDc = scale_for_dest<DstType, kLinear_SkColorProfileType>(dst_swizzle<DstType>(i->fDc));
}
const Interval* fFirstInterval;
« no previous file with comments | « no previous file | src/effects/gradients/Sk4fGradientPriv.h » ('j') | src/effects/gradients/Sk4fGradientPriv.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698