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

Unified Diff: src/gpu/SkGr.cpp

Issue 811903004: Do more cleanup from xp changes (Closed) Base URL: https://skia.googlesource.com/skia.git@removeReadDst
Patch Set: Remove virtual call Created 5 years, 11 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 | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 64142fe07e7acab7a9130fb95f36042e035b0292..a3972806f7c319df1160ca04980421bf3c97187f 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -514,15 +514,8 @@ void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor
grPaint->setAntiAlias(skPaint.isAntiAlias());
SkXfermode* mode = skPaint.getXfermode();
- GrFragmentProcessor* fragmentProcessor = NULL;
GrXPFactory* xpFactory = NULL;
- if (SkXfermode::AsFragmentProcessorOrXPFactory(mode, &fragmentProcessor, &xpFactory)) {
- if (fragmentProcessor) {
- SkASSERT(NULL == xpFactory);
- grPaint->addColorProcessor(fragmentProcessor)->unref();
- xpFactory = GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode);
- }
- } else {
+ if (!SkXfermode::AsXPFactory(mode, &xpFactory)) {
// Fall back to src-over
xpFactory = GrPorterDuffXPFactory::Create(SkXfermode::kSrcOver_Mode);
}
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698