diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-19 19:35:57 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-19 19:35:57 +0000 |
commit | 3595f88aff0a1b490aa6661f0ba2d3534ee86353 (patch) | |
tree | 4eecd9143b57a487722feab10a60fbaf0868961c /src/gpu/effects | |
parent | 584f337832d585e23037e59517f7bcc420424692 (diff) |
Pass in GrContext instead of SkGpuDevice for dashing and Sk2GrPaint conversion
BUG=skia:
R=bsalomon@google.com
Author: egdaniel@google.com
Review URL: https://codereview.chromium.org/292773002
git-svn-id: http://skia.googlecode.com/svn/trunk@14790 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/effects')
-rw-r--r-- | src/gpu/effects/GrDashingEffect.cpp | 6 | ||||
-rw-r--r-- | src/gpu/effects/GrDashingEffect.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp index 44974e8791..584d5096b9 100644 --- a/src/gpu/effects/GrDashingEffect.cpp +++ b/src/gpu/effects/GrDashingEffect.cpp @@ -14,7 +14,6 @@ #include "GrDrawTargetCaps.h" #include "GrEffect.h" #include "GrTBackendEffectFactory.h" -#include "SkGpuDevice.h" #include "SkGr.h" /////////////////////////////////////////////////////////////////////////////// @@ -87,8 +86,7 @@ static SkScalar calc_end_adjustment(const SkPathEffect::DashInfo& info, const Sk } -bool GrDashingEffect::DrawDashLine(const SkPoint pts[2], const SkPaint& paint, SkGpuDevice* dev) { - GrContext* context = dev->context(); +bool GrDashingEffect::DrawDashLine(const SkPoint pts[2], const SkPaint& paint, GrContext* context) { if (context->getRenderTarget()->isMultisampled()) { return false; } @@ -139,7 +137,7 @@ bool GrDashingEffect::DrawDashLine(const SkPoint pts[2], const SkPaint& paint, S } GrPaint grPaint; - SkPaint2GrPaintShader(dev, paint, true, &grPaint); + SkPaint2GrPaintShader(context, paint, true, &grPaint); bool useAA = paint.isAntiAlias(); diff --git a/src/gpu/effects/GrDashingEffect.h b/src/gpu/effects/GrDashingEffect.h index a1c2829fb8..0ed1cf031e 100644 --- a/src/gpu/effects/GrDashingEffect.h +++ b/src/gpu/effects/GrDashingEffect.h @@ -12,13 +12,13 @@ #include "GrTypesPriv.h" #include "SkPathEffect.h" -class SkGpuDevice; +class GrContext; class GrGLDashingEffect; class SkPath; namespace GrDashingEffect { - bool DrawDashLine(const SkPoint pnts[2], const SkPaint& paint, SkGpuDevice* dev); + bool DrawDashLine(const SkPoint pnts[2], const SkPaint& paint, GrContext* context); /** * An effect that renders a dashed line. It is intended to be used as a coverage effect. |