summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderstate/Blend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderstate/Blend.cpp')
-rw-r--r--libs/hwui/renderstate/Blend.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/renderstate/Blend.cpp b/libs/hwui/renderstate/Blend.cpp
index 789f6cc..29927ed 100644
--- a/libs/hwui/renderstate/Blend.cpp
+++ b/libs/hwui/renderstate/Blend.cpp
@@ -78,10 +78,10 @@ Blend::Blend()
// gl blending off by default
}
-void Blend::enable(SkXfermode::Mode mode, bool swapSrcDst) {
+void Blend::enable(SkXfermode::Mode mode, ModeOrderSwap modeUsage) {
GLenum srcMode;
GLenum dstMode;
- getFactors(mode, swapSrcDst, &srcMode, &dstMode);
+ getFactors(mode, modeUsage, &srcMode, &dstMode);
setFactors(srcMode, dstMode);
}
@@ -105,9 +105,9 @@ void Blend::syncEnabled() {
}
}
-void Blend::getFactors(SkXfermode::Mode mode, bool swapSrcDst, GLenum* outSrc, GLenum* outDst) {
- *outSrc = swapSrcDst ? kBlendsSwap[mode].src : kBlends[mode].src;
- *outDst = swapSrcDst ? kBlendsSwap[mode].dst : kBlends[mode].dst;
+void Blend::getFactors(SkXfermode::Mode mode, ModeOrderSwap modeUsage, GLenum* outSrc, GLenum* outDst) {
+ *outSrc = (modeUsage == ModeOrderSwap::Swap) ? kBlendsSwap[mode].src : kBlends[mode].src;
+ *outDst = (modeUsage == ModeOrderSwap::Swap) ? kBlendsSwap[mode].dst : kBlends[mode].dst;
}
void Blend::setFactors(GLenum srcMode, GLenum dstMode) {