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

Unified Diff: src/gpu/GrPathRenderer.h

Issue 22173002: Fix a crash on stroking empty paths with nv_path_rendering enabled (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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/gl/GrGLPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathRenderer.h
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index f1402d6b2390563af482cde9bc79ff92983824b1..a64b9e34444b10b23911ceea20607faec2f41dc1 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -117,6 +117,7 @@ public:
const SkStrokeRec& stroke,
GrDrawTarget* target,
bool antiAlias) {
+ GrAssert(!path.isEmpty());
GrAssert(this->canDrawPath(path, stroke, target, antiAlias));
GrAssert(target->drawState()->getStencil().isDisabled() ||
kNoRestriction_StencilSupport == this->getStencilSupport(path, stroke, target));
@@ -132,6 +133,7 @@ public:
* @param target target that the path will be rendered to
*/
void stencilPath(const SkPath& path, const SkStrokeRec& stroke, GrDrawTarget* target) {
+ GrAssert(!path.isEmpty());
GrAssert(kNoSupport_StencilSupport != this->getStencilSupport(path, stroke, target));
this->onStencilPath(path, stroke, target);
}
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698