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

Unified Diff: src/gpu/GrAARectRenderer.h

Issue 23712005: Add bevel-stroke support in GrAARectRenderer (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: fix small bugs Created 7 years, 1 month 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
Index: src/gpu/GrAARectRenderer.h
diff --git a/src/gpu/GrAARectRenderer.h b/src/gpu/GrAARectRenderer.h
index 2e705ca80191e958c4fa139e8745aea7c35bdd9a..3e7e980e59371c6e3fa2043f6ee0ae33e79cb5c5 100644
--- a/src/gpu/GrAARectRenderer.h
+++ b/src/gpu/GrAARectRenderer.h
@@ -11,6 +11,7 @@
#include "SkMatrix.h"
#include "SkRect.h"
#include "SkRefCnt.h"
+#include "SkStrokeRec.h"
class GrGpu;
class GrDrawTarget;
@@ -25,7 +26,8 @@ public:
GrAARectRenderer()
: fAAFillRectIndexBuffer(NULL)
- , fAAStrokeRectIndexBuffer(NULL) {
+ , fAAMiterStrokeRectIndexBuffer(NULL)
+ , fAABevelStrokeRectIndexBuffer(NULL) {
}
void reset();
@@ -35,7 +37,7 @@ public:
}
// TODO: potentialy fuse the fill & stroke methods and differentiate
- // between them by passing in strokeWidth (<0 means fill).
+ // between them by passing in stroke (==NULL means fill).
void fillAARect(GrGpu* gpu,
GrDrawTarget* target,
@@ -63,7 +65,7 @@ public:
const SkRect& rect,
const SkMatrix& combinedMatrix,
const SkRect& devRect,
- SkScalar width,
+ const SkStrokeRec* stroke,
bool useVertexCoverage);
// First rect is outer; second rect is inner
@@ -75,12 +77,13 @@ public:
private:
GrIndexBuffer* fAAFillRectIndexBuffer;
- GrIndexBuffer* fAAStrokeRectIndexBuffer;
+ GrIndexBuffer* fAAMiterStrokeRectIndexBuffer;
+ GrIndexBuffer* fAABevelStrokeRectIndexBuffer;
GrIndexBuffer* aaFillRectIndexBuffer(GrGpu* gpu);
- static int aaStrokeRectIndexCount();
- GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu);
+ static int aaStrokeRectIndexCount(bool miterStroke);
+ GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu, bool miterStroke);
// TODO: Remove the useVertexCoverage boolean. Just use it all the time
// since we now have a coverage vertex attribute
@@ -104,8 +107,10 @@ private:
void geometryStrokeAARect(GrGpu* gpu,
GrDrawTarget* target,
const SkRect& devOutside,
+ const SkRect& devOutsideAssist,
const SkRect& devInside,
- bool useVertexCoverage);
+ bool useVertexCoverage,
+ bool miterStroke);
typedef SkRefCnt INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698