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

Unified Diff: src/gpu/GrClipMaskManager.cpp

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 | « gyp/tests.gyp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 93c45641ee513495910d851372180a8f3c512e06..806928ca1412796f6049e720223d915264363442 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -691,11 +691,13 @@ bool GrClipMaskManager::createStencilClipMask(InitialState initialState,
fGpu->drawSimpleRect(element->getRect(), NULL);
} else {
GrAssert(Element::kPath_Type == element->getType());
- if (canRenderDirectToStencil) {
- *drawState->stencil() = gDrawToStencil;
- pr->drawPath(*clipPath, stroke, fGpu, false);
- } else {
- pr->stencilPath(*clipPath, stroke, fGpu);
+ if (!clipPath->isEmpty()) {
+ if (canRenderDirectToStencil) {
+ *drawState->stencil() = gDrawToStencil;
+ pr->drawPath(*clipPath, stroke, fGpu, false);
+ } else {
+ pr->stencilPath(*clipPath, stroke, fGpu);
+ }
}
}
}
« no previous file with comments | « gyp/tests.gyp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698