aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPath.h
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2015-12-07 23:39:01 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-07 23:39:01 -0800
commitc6e7a13489eda2abf7a03ea8de3a4abbab1c597d (patch)
treea2f4df09f0526d5115df41e4a3fee69bd58a83b0 /src/gpu/GrPath.h
parentdfd6c6e3bb8c951fcd2bf85995629f1c8ef76590 (diff)
Use correct fill type and bounds for NVPR paths that are stroked with Skia
When using NVPR, sometimes paths must be stroked by Skia and then drawn with fill using NVPR. In these cases, use the fill type and bounds of the stroked path, not the original path. Fixes degeneratesegments for nvprmsaa backends. BUG=skia:4608 Review URL: https://codereview.chromium.org/1504753003
Diffstat (limited to 'src/gpu/GrPath.h')
-rw-r--r--src/gpu/GrPath.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gpu/GrPath.h b/src/gpu/GrPath.h
index 2edfd4cb5e..09d317ef2f 100644
--- a/src/gpu/GrPath.h
+++ b/src/gpu/GrPath.h
@@ -10,19 +10,19 @@
#include "GrGpuResource.h"
#include "GrStrokeInfo.h"
+#include "GrPathRendering.h"
#include "SkPath.h"
#include "SkRect.h"
class GrPath : public GrGpuResource {
public:
-
-
/**
* Initialize to a path with a fixed stroke. Stroke must not be hairline.
*/
GrPath(GrGpu* gpu, const SkPath& skPath, const GrStrokeInfo& stroke)
: INHERITED(gpu, kCached_LifeCycle)
- , fBounds(skPath.getBounds())
+ , fBounds(SkRect::MakeEmpty())
+ , fFillType(GrPathRendering::kWinding_FillType)
#ifdef SK_DEBUG
, fSkPath(skPath)
, fStroke(stroke)
@@ -35,12 +35,15 @@ public:
const SkRect& getBounds() const { return fBounds; }
+ GrPathRendering::FillType getFillType() const { return fFillType; }
#ifdef SK_DEBUG
bool isEqualTo(const SkPath& path, const GrStrokeInfo& stroke) const;
#endif
protected:
+ // Subclass should init these.
SkRect fBounds;
+ GrPathRendering::FillType fFillType;
#ifdef SK_DEBUG
SkPath fSkPath;
GrStrokeInfo fStroke;