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

Unified Diff: include/gpu/GrXferProcessor.h

Issue 1132373003: Add function for logging blend info on XP. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warning? Created 5 years, 7 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/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrXferProcessor.h
diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h
index 812ce5c64cb050372b3bac37a0489a33a23b913c..fa9dca211e8fcd24ea0fb81c4c8b743da09a33f8 100644
--- a/include/gpu/GrXferProcessor.h
+++ b/include/gpu/GrXferProcessor.h
@@ -23,8 +23,6 @@ class GrProcOptInfo;
* Equations for alpha-blending.
*/
enum GrBlendEquation {
- kInvalid_GrBlendEquation = -1,
-
// Basic blend equations.
kAdd_GrBlendEquation, //<! Cs*S + Cd*D
kSubtract_GrBlendEquation, //<! Cs*S - Cd*D
@@ -47,11 +45,12 @@ enum GrBlendEquation {
kHSLColor_GrBlendEquation,
kHSLLuminosity_GrBlendEquation,
- kTotalGrBlendEquationCount,
-
- kFirstAdvancedGrBlendEquation = kScreen_GrBlendEquation
+ kFirstAdvancedGrBlendEquation = kScreen_GrBlendEquation,
+ kLast_GrBlendEquation = kHSLLuminosity_GrBlendEquation
};
+static const int kGrBlendEquationCnt = kLast_GrBlendEquation + 1;
+
inline bool GrBlendEquationIsAdvanced(GrBlendEquation equation) {
return equation >= kFirstAdvancedGrBlendEquation;
}
@@ -60,8 +59,6 @@ inline bool GrBlendEquationIsAdvanced(GrBlendEquation equation) {
* Coeffecients for alpha-blending.
*/
enum GrBlendCoeff {
- kInvalid_GrBlendCoeff = -1,
-
kZero_GrBlendCoeff, //<! 0
kOne_GrBlendCoeff, //<! 1
kSC_GrBlendCoeff, //<! src color
@@ -81,9 +78,11 @@ enum GrBlendCoeff {
kS2A_GrBlendCoeff,
kIS2A_GrBlendCoeff,
- kTotalGrBlendCoeffCount
+ kLast_GrBlendCoeff = kIS2A_GrBlendCoeff
};
+static const int kGrBlendCoeffCnt = kLast_GrBlendCoeff + 1;
+
/**
* Barriers for blending. When a shader reads the dst directly, an Xfer barrier is sometimes
* required after a pixel has been written, before it can be safely read again.
@@ -187,6 +186,8 @@ public:
fWriteColor = true;
}
+ SkDEBUGCODE(SkString dump() const;)
+
GrBlendEquation fEquation;
GrBlendCoeff fSrcBlend;
GrBlendCoeff fDstBlend;
« no previous file with comments | « no previous file | src/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698