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

Unified Diff: gm/texdata.cpp

Issue 759713002: Make all blending up to GrOptDrawState be handled by the xp/xp factory. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferFactorySolo
Patch Set: Clean up Created 6 years 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 | include/core/SkXfermode.h » ('j') | include/gpu/GrPaint.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texdata.cpp
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index efe8c4d7304c33e7f5bcf717782f4b4f34881ee6..1b8909a0ff0b7f59229a99228d5fd5fe4787a69f 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -12,8 +12,9 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
-#include "effects/GrSimpleTextureEffect.h"
#include "SkColorPriv.h"
+#include "effects/GrPorterDuffXferProcessor.h"
+#include "effects/GrSimpleTextureEffect.h"
namespace skiagm {
@@ -98,7 +99,9 @@ protected:
ctx->setRenderTarget(target);
GrPaint paint;
- paint.setBlendFunc(kOne_GrBlendCoeff, kISA_GrBlendCoeff);
+ GrXPFactory* xpFactory = GrPorterDuffXPFactory::Create(SkXfermode::kSrcOver_Mode);
bsalomon 2014/12/04 21:54:24 I think we should have a shortcut on GrPaint/GrDS,
egdaniel 2014/12/08 14:52:06 Done.
+ paint.setXPFactory(xpFactory)->unref();
+
SkMatrix vm;
if (i) {
vm.setRotate(90 * SK_Scalar1,
« no previous file with comments | « no previous file | include/core/SkXfermode.h » ('j') | include/gpu/GrPaint.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698