aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-12-08 11:20:39 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-08 11:20:40 -0800
commit7c66342a399b529634bed0fabfaa562db2c0dbd4 (patch)
tree1acf634452770b9ef66d8a1422748422062ec9d6 /gm
parenta2bd24fd15378d0a25d79b4aa2d76dddc4cf564c (diff)
Make all blending up to GrOptDrawState be handled by the xp/xp factory.
In this cl the blending information is extracted for the xp and stored in the ODS which is then used as it currently is. In the follow up cl, an XP backend will be added and at that point all blending work will take place inside XP's. BUG=skia: Review URL: https://codereview.chromium.org/759713002
Diffstat (limited to 'gm')
-rw-r--r--gm/texdata.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index efe8c4d730..56dfd24ed0 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,8 @@ protected:
ctx->setRenderTarget(target);
GrPaint paint;
- paint.setBlendFunc(kOne_GrBlendCoeff, kISA_GrBlendCoeff);
+ paint.setPorterDuffXPFactory(SkXfermode::kSrcOver_Mode);
+
SkMatrix vm;
if (i) {
vm.setRotate(90 * SK_Scalar1,