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

Unified Diff: include/effects/SkColorMatrix.h

Issue 135123008: replace impl of SkLightingColorFilter with SkColorMatrixFilter (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 | « no previous file | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkColorMatrix.h
diff --git a/include/effects/SkColorMatrix.h b/include/effects/SkColorMatrix.h
index 84a3b7c4970efff02dcd7a7a881a91948876e412..8ff45f9277289b02fd6b2776dd120bb05ee9d4a6 100644
--- a/include/effects/SkColorMatrix.h
+++ b/include/effects/SkColorMatrix.h
@@ -14,6 +14,18 @@ class SK_API SkColorMatrix {
public:
SkScalar fMat[20];
+ enum Elem {
+ kR_Scale = 0,
+ kG_Scale = 6,
+ kB_Scale = 12,
+ kA_Scale = 18,
+
+ kR_Trans = 4,
+ kG_Trans = 9,
+ kB_Trans = 14,
+ kA_Trans = 19,
+ };
+
void setIdentity();
void setScale(SkScalar rScale, SkScalar gScale, SkScalar bScale,
SkScalar aScale = SK_Scalar1);
@@ -21,6 +33,8 @@ public:
SkScalar aScale = SK_Scalar1);
void postScale(SkScalar rScale, SkScalar gScale, SkScalar bScale,
SkScalar aScale = SK_Scalar1);
+ void postTranslate(SkScalar rTrans, SkScalar gTrans, SkScalar bTrans,
+ SkScalar aTrans = 0);
enum Axis {
kR_Axis = 0,
« no previous file with comments | « no previous file | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698