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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: addressing review comments Created 7 years, 2 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
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 47460ac527b56ac85d3efdccde2dc5f999e3ee11..4051687dbdd7acfbaca82c79f9a0638b36c0f04a 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -329,6 +329,12 @@ public:
void stencilPath(const GrPath*, const SkStrokeRec& stroke, SkPath::FillType fill);
/**
+ * Fills a path. Fill must not be a hairline. It will respect the HW
+ * antialias flag on the draw state (if possible in the 3D API).
+ */
+ void fillPath(const GrPath*, const SkStrokeRec& stroke, SkPath::FillType fill);
+
+ /**
* Helper function for drawing rects. It performs a geometry src push and pop
* and thus will finalize any reserved geometry.
*
@@ -761,15 +767,6 @@ protected:
}
const SkRect* getDevBounds() const { return fDevBounds; }
- bool getDevIBounds(SkIRect* bounds) const {
- if (NULL != fDevBounds) {
- fDevBounds->roundOut(bounds);
- return true;
- } else {
- return false;
- }
- }
-
// NULL if no copy of the dst is needed for the draw.
const GrDeviceCoordTexture* getDstCopy() const {
if (NULL != fDstCopy.texture()) {
@@ -834,6 +831,8 @@ private:
const SkRect* localRect,
const SkMatrix* localMatrix);
virtual void onStencilPath(const GrPath*, const SkStrokeRec& stroke, SkPath::FillType fill) = 0;
+ virtual void onFillPath(const GrPath*, const SkStrokeRec& stroke, SkPath::FillType fill,
+ const GrDeviceCoordTexture* dstCopy) = 0;
// helpers for reserving vertex and index space.
bool reserveVertexSpace(size_t vertexSize,
@@ -852,7 +851,10 @@ private:
// Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
// but couldn't be made. Otherwise, returns true.
- bool setupDstReadIfNecessary(DrawInfo* info);
+ bool setupDstReadIfNecessary(DrawInfo* info) {
+ return setupDstReadIfNecessary(&info->fDstCopy, info->getDevBounds());
bsalomon 2013/10/08 14:05:08 nit: this->setup...
Kimmo Kinnunen 2013/10/09 07:07:01 Done.
+ }
+ bool setupDstReadIfNecessary(GrDeviceCoordTexture* dstCopy, const SkRect* drawBounds);
// Check to see if this set of draw commands has been sent out
virtual bool isIssued(uint32_t drawID) { return true; }
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | src/gpu/GrGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698