aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-01-22 00:04:30 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-22 00:04:30 -0800
commit2a2bdc698460c38ac9e24ba4abdeefec67bcba37 (patch)
treefd2660e993c369874be1966a95ebc673194aabb4 /include/core
parent7765000709dc64eb23be7df47d1f995d1f787115 (diff)
Revert of experiment: float color components (patchset #6 id:100001 of https://codereview.chromium.org/1617813002/ )
Reason for revert: broke some colormatrix tests Original issue's description: > experiment: float color components > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1617813002 > > Committed: https://skia.googlesource.com/skia/+/353c148d8e8c9031daca34c6f9d6bcc6f08706c7 TBR=fmalita@chromium.org,mtklein@google.com,herb@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1623453002
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkColor.h40
-rw-r--r--include/core/SkColorFilter.h5
-rw-r--r--include/core/SkColorPriv.h5
-rw-r--r--include/core/SkShader.h3
4 files changed, 1 insertions, 52 deletions
diff --git a/include/core/SkColor.h b/include/core/SkColor.h
index 77946387e5..1ba1331c1a 100644
--- a/include/core/SkColor.h
+++ b/include/core/SkColor.h
@@ -160,44 +160,4 @@ SK_API SkPMColor SkPreMultiplyColor(SkColor c);
*/
typedef SkPMColor (*SkXfermodeProc)(SkPMColor src, SkPMColor dst);
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-/*
- * The float values are 0...1 premultiplied
- */
-struct SK_ATTRIBUTE(aligned(16)) SkPM4f {
- float fVec[4];
-
- float a() const { return fVec[SK_A32_SHIFT/8]; }
-};
-
-/*
- * The float values are 0...1 unpremultiplied
- */
-struct SkColor4f {
- float fA;
- float fR;
- float fG;
- float fB;
-
- bool operator==(const SkColor4f& other) const {
- return fA == other.fA && fR == other.fR && fG == other.fG && fB == other.fB;
- }
- bool operator!=(const SkColor4f& other) const {
- return !(*this == other);
- }
-
- const float* vec() const { return &fA; }
- float* vec() { return &fA; }
-
- static SkColor4f Pin(float a, float r, float g, float b);
- static SkColor4f FromColor(SkColor);
-
- SkColor4f pin() const {
- return Pin(fA, fR, fG, fB);
- }
-
- SkPM4f premul() const;
-};
-
#endif
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index 211aae6962..c5d084a22d 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -68,13 +68,10 @@ public:
*/
virtual void filterSpan(const SkPMColor src[], int count, SkPMColor result[]) const = 0;
- virtual void filterSpan4f(const SkPM4f src[], int count, SkPM4f result[]) const;
-
enum Flags {
/** If set the filter methods will not change the alpha channel of the colors.
*/
- kAlphaUnchanged_Flag = 1 << 0,
- kSupports4f_Flag = 1 << 1,
+ kAlphaUnchanged_Flag = 0x01,
};
/** Returns the flags for this filter. Override in subclasses to return custom flags.
diff --git a/include/core/SkColorPriv.h b/include/core/SkColorPriv.h
index bd0e040566..6347660dbc 100644
--- a/include/core/SkColorPriv.h
+++ b/include/core/SkColorPriv.h
@@ -71,11 +71,6 @@
SK_B32_SHIFT == SK_BGRA_B32_SHIFT)
-#define SK_A_INDEX (SK_A32_SHIFT/8)
-#define SK_R_INDEX (SK_R32_SHIFT/8)
-#define SK_G_INDEX (SK_G32_SHIFT/8)
-#define SK_B_INDEX (SK_B32_SHIFT/8)
-
#if defined(SK_PMCOLOR_IS_RGBA) && !LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA
#error "SK_PMCOLOR_IS_RGBA does not match SK_*32_SHIFT values"
#endif
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index bf6d6ddb42..60ef280d5e 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -81,7 +81,6 @@ public:
shadeSpan().
*/
kConstInY32_Flag = 1 << 1,
- kSupports4f_Flag = 1 << 2,
};
/**
@@ -128,8 +127,6 @@ public:
*/
virtual void shadeSpan(int x, int y, SkPMColor[], int count) = 0;
- virtual void shadeSpan4f(int x, int y, SkPM4f[], int count);
-
/**
* The const void* ctx is only const because all the implementations are const.
* This can be changed to non-const if a new shade proc needs to change the ctx.