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/SkShader.cpp

Issue 1623453002: Revert of experiment: float color components (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/SkMathPriv.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/SkShader.cpp
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 856b6592134ff01451919c48383976fac6cd9a32..bd3876a69b988a0d329e7e1e9abed02052223d12 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -115,10 +115,6 @@
SkShader::Context::ShadeProc SkShader::Context::asAShadeProc(void** ctx) {
return nullptr;
-}
-
-void SkShader::Context::shadeSpan4f(int x, int y, SkPM4f[], int count) {
- SkASSERT(false && "shadeSpan4f called but not implemented");
}
#include "SkColorPriv.h"
@@ -283,11 +279,7 @@
}
fPMColor = SkPackARGB32(a, r, g, b);
- SkColor4f c4 = SkColor4f::FromColor(shader.fColor);
- c4.fA *= rec.fPaint->getAlpha() / 255.0f;
- fPM4f = c4.premul();
-
- fFlags = kConstInY32_Flag | kSupports4f_Flag;
+ fFlags = kConstInY32_Flag;
if (255 == a) {
fFlags |= kOpaqueAlpha_Flag;
}
@@ -299,12 +291,6 @@
void SkColorShader::ColorShaderContext::shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) {
memset(alpha, SkGetPackedA32(fPMColor), count);
-}
-
-void SkColorShader::ColorShaderContext::shadeSpan4f(int x, int y, SkPM4f span[], int count) {
- for (int i = 0; i < count; ++i) {
- span[i] = fPM4f;
- }
}
SkShader::GradientType SkColorShader::asAGradient(GradientInfo* info) const {
« no previous file with comments | « src/core/SkMathPriv.h ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698