Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: src/gpu/GrPath.h

Issue 1504753003: Use correct fill type and bounds for NVPR paths that are stroked with Skia (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPath.h
diff --git a/src/gpu/GrPath.h b/src/gpu/GrPath.h
index 2edfd4cb5e60bf960e3ecda7f0cf1e6d5ad8aa37..09d317ef2f2d3d0883c01933c67151091b68da20 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;
« no previous file with comments | « no previous file | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698