diff options
author | egdaniel <egdaniel@google.com> | 2014-12-09 11:15:43 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-09 11:15:44 -0800 |
commit | 9513143efa734bef0c1a0c7f945022572dbc8518 (patch) | |
tree | 767babf49d28d878f8eb29900115bfc54dd54917 /tests | |
parent | 9f876a37d8b80ef04ccbc7755cf4572aecc33981 (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:
Committed: https://skia.googlesource.com/skia/+/7c66342a399b529634bed0fabfaa562db2c0dbd4
Review URL: https://codereview.chromium.org/759713002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GLProgramsTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 18c14c45be..56707a0414 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -16,10 +16,12 @@ #include "GrInvariantOutput.h" #include "GrOptDrawState.h" #include "GrTest.h" +#include "GrXferProcessor.h" #include "SkChecksum.h" #include "SkRandom.h" #include "Test.h" #include "effects/GrConfigConversionEffect.h" +#include "effects/GrPorterDuffXferProcessor.h" #include "gl/GrGLPathRendering.h" #include "gl/GrGpuGL.h" #include "gl/builders/GrGLProgramBuilder.h" @@ -267,7 +269,8 @@ static void set_random_blend_func(GrDrawState* ds, SkRandom* random) { dst = GrBlendCoeff(random->nextRangeU(kFirstPublicGrBlendCoeff, kLastPublicGrBlendCoeff)); } while (GrBlendCoeffRefsDst(dst)); - ds->setBlendFunc(src, dst); + GrXPFactory* xpFactory = GrPorterDuffXPFactory::Create(src, dst); + ds->setXPFactory(xpFactory)->unref(); } // right now, the only thing we seem to care about in drawState's stencil is 'doesWrite()' |