diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-27 18:31:15 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-27 18:31:15 +0000 |
commit | f51c01328dc52a87c07e056d6fc4eb7452ccac7a (patch) | |
tree | ab5902f078fe940005ae5b7bd767cd6d629de640 /src/gpu | |
parent | 31ec7985f2b52a0cab4aa714a613b918cf663c08 (diff) |
Add interface to SkXfermode to return a GrEffect and blend coeffs.
Review URL: https://codereview.chromium.org/13097006
git-svn-id: http://skia.googlecode.com/svn/trunk@8412 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 77c4bd1115..ad65d17214 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -484,13 +484,15 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev, SkXfermode::Coeff dm = SkXfermode::kISA_Coeff; SkXfermode* mode = skPaint.getXfermode(); - if (mode) { - if (!mode->asCoeff(&sm, &dm)) { - //SkDEBUGCODE(SkDebugf("Unsupported xfer mode.\n");) + GrEffectRef* xferEffect; + if (SkXfermode::AsNewEffect(mode, dev->context(), &xferEffect, &sm, &dm)) { + // We're not ready for xfermode effects yet + GrAssert(NULL == xferEffect); + } else { + //SkDEBUGCODE(SkDebugf("Unsupported xfer mode.\n");) #if 0 - return false; + return false; #endif - } } grPaint->setBlendFunc(sk_blend_to_grblend(sm), sk_blend_to_grblend(dm)); |