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

Unified Diff: src/gpu/GrDashLinePathRenderer.h

Issue 1100073003: Extract gpu line dashing to GrDashLinePathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments Created 5 years, 8 months 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 | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDashLinePathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDashLinePathRenderer.h
diff --git a/src/gpu/GrTessellatingPathRenderer.h b/src/gpu/GrDashLinePathRenderer.h
similarity index 62%
copy from src/gpu/GrTessellatingPathRenderer.h
copy to src/gpu/GrDashLinePathRenderer.h
index 977260821fa1c699d4096c923ac6a84480d55d9a..632f30a898df53bb32ad172a1657b426227f1f67 100644
--- a/src/gpu/GrTessellatingPathRenderer.h
+++ b/src/gpu/GrDashLinePathRenderer.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2015 Google Inc.
*
@@ -5,41 +6,41 @@
* found in the LICENSE file.
*/
-#ifndef GrTessellatingPathRenderer_DEFINED
-#define GrTessellatingPathRenderer_DEFINED
+#ifndef GrDashLinePathRenderer_DEFINED
+#define GrDashLinePathRenderer_DEFINED
#include "GrPathRenderer.h"
-/**
- * Subclass that renders the path by converting to screen-space trapezoids plus
- * extra 1-pixel geometry for AA.
- */
-class SK_API GrTessellatingPathRenderer : public GrPathRenderer {
+class GrDashLinePathRenderer : public GrPathRenderer {
public:
- GrTessellatingPathRenderer();
+ GrDashLinePathRenderer(GrContext*);
+ ~GrDashLinePathRenderer();
bool canDrawPath(const GrDrawTarget*,
const GrPipelineBuilder*,
- const SkMatrix&,
+ const SkMatrix& viewMatrix,
const SkPath&,
- const SkStrokeRec&,
+ const GrStrokeInfo&,
bool antiAlias) const override;
-protected:
+protected:
StencilSupport onGetStencilSupport(const GrDrawTarget*,
const GrPipelineBuilder*,
const SkPath&,
- const SkStrokeRec&) const override;
+ const GrStrokeInfo&) const override {
+ return kNoSupport_StencilSupport;
+ }
bool onDrawPath(GrDrawTarget*,
GrPipelineBuilder*,
GrColor,
const SkMatrix& viewMatrix,
const SkPath&,
- const SkStrokeRec&,
+ const GrStrokeInfo&,
bool antiAlias) override;
-
+ SkAutoTUnref<GrGpu> fGpu;
typedef GrPathRenderer INHERITED;
};
+
#endif
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDashLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698