From 7c66342a399b529634bed0fabfaa562db2c0dbd4 Mon Sep 17 00:00:00 2001 From: egdaniel Date: Mon, 8 Dec 2014 11:20:39 -0800 Subject: 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 --- gm/texdata.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gm') 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, -- cgit v1.2.3