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

Unified Diff: src/core/SkXfermode.cpp

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years, 1 month 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 | « src/core/SkImageFilter.cpp ('k') | src/effects/SkArithmeticMode_gpu.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 9083814d1a66b97a00e05436f0dd8e7c61ab44ee..79de322c2daceb95dce39bfc304776556e5ade70 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -660,26 +660,6 @@ bool SkXfermode::asXPFactory(GrXPFactory**) const {
return false;
}
-
-#if SK_SUPPORT_GPU
-#include "effects/GrPorterDuffXferProcessor.h"
-
-bool SkXfermode::AsXPFactory(SkXfermode* xfermode, GrXPFactory** xpf) {
- if (nullptr == xfermode) {
- if (xpf) {
- *xpf = GrPorterDuffXPFactory::Create(kSrcOver_Mode);
- }
- return true;
- } else {
- return xfermode->asXPFactory(xpf);
- }
-}
-#else
-bool SkXfermode::AsXPFactory(SkXfermode* xfermode, GrXPFactory** xpf) {
- return false;
-}
-#endif
-
SkPMColor SkXfermode::xferColor(SkPMColor src, SkPMColor dst) const{
// no-op. subclasses should override this
return dst;
@@ -920,6 +900,7 @@ void SkProcCoeffXfermode::xferA8(SkAlpha* SK_RESTRICT dst,
#if SK_SUPPORT_GPU
#include "effects/GrCustomXfermode.h"
+#include "effects/GrPorterDuffXferProcessor.h"
#include "effects/GrXfermodeFragmentProcessor.h"
bool SkProcCoeffXfermode::asFragmentProcessor(const GrFragmentProcessor** fp,
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkArithmeticMode_gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698