diff options
author | 2017-05-18 15:06:54 -0400 | |
---|---|---|
committer | 2017-05-18 19:45:45 +0000 | |
commit | 3af1af9e979552cf2e3b22feb1de5aeba810fc4e (patch) | |
tree | 20bfe9c69557b91e42d77920d2625a0eaa3efc8d /src/gpu/SkGpuDevice.cpp | |
parent | 7f1ce29c9bb9be8b2d8dbf9a99f14f74d5dc6d80 (diff) |
Remove ambient and spot mask filters.
Also remove a deprecated interface in SkShadowUtils.
Change-Id: I32e67271be953f11071c512cb39a47ea1e7dcaaf
Reviewed-on: https://skia-review.googlesource.com/17266
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index c90ad28129..87a4f99c7a 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -47,6 +47,7 @@ #include "effects/GrBicubicEffect.h" #include "effects/GrSimpleTextureEffect.h" #include "effects/GrTextureDomain.h" +#include "../private/SkShadowFlags.h" #include "text/GrTextUtils.h" #if SK_SUPPORT_GPU @@ -1661,6 +1662,29 @@ void SkGpuDevice::drawVertices(const SkVertices* vertices, SkBlendMode mode, /////////////////////////////////////////////////////////////////////////////// +void SkGpuDevice::drawShadow(const SkPath& path, const SkDrawShadowRec& rec) { + + ASSERT_SINGLE_OWNER + CHECK_SHOULD_DRAW(); + GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawShadow", fContext.get()); + + SkPaint p; + p.setColor(rec.fColor); + GrPaint grPaint; + if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), p, this->ctm(), + &grPaint)) { + return; + } + + if (!fRenderTargetContext->drawFastShadow(this->clip(), std::move(grPaint), + this->ctm(), path, rec)) { + // failed to find an accelerated case + this->INHERITED::drawShadow(path, rec); + } +} + +/////////////////////////////////////////////////////////////////////////////// + void SkGpuDevice::drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect texRect[], const SkColor colors[], int count, SkBlendMode mode, const SkPaint& paint) { |