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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase 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.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index c2256a84d8c7cf5cac2df1b09df4bd76b01e4f52..fb6e3d2d52cca251ac20dc5b1d0c798da5e902c5 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -518,12 +518,20 @@ void GrDrawTarget::drawNonIndexed(GrPrimitiveType type,
void GrDrawTarget::stencilPath(const GrPath* path, const SkStrokeRec& stroke, SkPath::FillType fill) {
// TODO: extract portions of checkDraw that are relevant to path stenciling.
SkASSERT(NULL != path);
- SkASSERT(this->caps()->pathStencilingSupport());
+ SkASSERT(this->caps()->pathRenderingSupport());
SkASSERT(!stroke.isHairlineStyle());
SkASSERT(!SkPath::IsInverseFillType(fill));
this->onStencilPath(path, stroke, fill);
}
+void GrDrawTarget::fillPath(const GrPath* path, const SkStrokeRec& stroke, SkPath::FillType fill) {
+ // TODO: extract portions of checkDraw that are relevant to path rendering.
+ SkASSERT(NULL != path);
+ SkASSERT(this->caps()->pathRenderingSupport());
+ SkASSERT(!stroke.isHairlineStyle());
+ this->onFillPath(path, stroke, fill);
+}
+
////////////////////////////////////////////////////////////////////////////////
bool GrDrawTarget::willUseHWAALines() const {
@@ -949,7 +957,7 @@ void GrDrawTargetCaps::reset() {
fGeometryShaderSupport = false;
fDualSourceBlendingSupport = false;
fBufferLockSupport = false;
- fPathStencilingSupport = false;
+ fPathRenderingSupport = false;
fDstReadInShaderSupport = false;
fReuseScratchTextures = true;
@@ -968,7 +976,7 @@ GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
fGeometryShaderSupport = other.fGeometryShaderSupport;
fDualSourceBlendingSupport = other.fDualSourceBlendingSupport;
fBufferLockSupport = other.fBufferLockSupport;
- fPathStencilingSupport = other.fPathStencilingSupport;
+ fPathRenderingSupport = other.fPathRenderingSupport;
fDstReadInShaderSupport = other.fDstReadInShaderSupport;
fReuseScratchTextures = other.fReuseScratchTextures;
@@ -990,7 +998,7 @@ void GrDrawTargetCaps::print() const {
GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]);
GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSupport]);
GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]);
- GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]);
+ GrPrintf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]);
GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]);
GrPrintf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]);
GrPrintf("Max Texture Size : %d\n", fMaxTextureSize);

Powered by Google App Engine
This is Rietveld 408576698