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

Unified Diff: src/core/SkXfermode.cpp

Issue 37593002: Split up SkXfermode::asNewEffectOrCoeff() into asNewEffect(), asCoeff(). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | « include/core/SkXfermode.h ('k') | src/core/SkXfermode_proccoeff.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkXfermode.cpp
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 75c652912b9f27d869087554d6665310ee03e724..d2947ee8c60ab66a4bda084820a4206cb7c24098 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -673,8 +673,8 @@ bool SkXfermode::asMode(Mode* mode) const {
return false;
}
-bool SkXfermode::asNewEffectOrCoeff(GrEffectRef**, Coeff* src, Coeff* dst, GrTexture*) const {
- return this->asCoeff(src, dst);
+bool SkXfermode::asNewEffect(GrEffectRef** effect, GrTexture* background) const {
+ return false;
}
bool SkXfermode::AsNewEffectOrCoeff(SkXfermode* xfermode,
@@ -684,8 +684,10 @@ bool SkXfermode::AsNewEffectOrCoeff(SkXfermode* xfermode,
GrTexture* background) {
if (NULL == xfermode) {
return ModeAsCoeff(kSrcOver_Mode, src, dst);
+ } else if (xfermode->asCoeff(src, dst)) {
+ return true;
} else {
- return xfermode->asNewEffectOrCoeff(effect, src, dst, background);
+ return xfermode->asNewEffect(effect, background);
}
}
@@ -1363,13 +1365,8 @@ bool SkProcCoeffXfermode::asCoeff(Coeff* sc, Coeff* dc) const {
}
#if SK_SUPPORT_GPU
-bool SkProcCoeffXfermode::asNewEffectOrCoeff(GrEffectRef** effect,
- Coeff* src,
- Coeff* dst,
- GrTexture* background) const {
- if (this->asCoeff(src, dst)) {
- return true;
- }
+bool SkProcCoeffXfermode::asNewEffect(GrEffectRef** effect,
+ GrTexture* background) const {
if (XferEffect::IsSupportedMode(fMode)) {
if (NULL != effect) {
*effect = XferEffect::Create(fMode, background);
« no previous file with comments | « include/core/SkXfermode.h ('k') | src/core/SkXfermode_proccoeff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698