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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 2108523002: Make lines a special case in GrShape (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: reject empty shape in GrDC::internalDrawPath Created 4 years, 6 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 | « no previous file | src/gpu/GrShape.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 7ee4e620e58ce040d9cddd1b1f7d51a0cf779a06..eec1389a81f8d6626aa9cbea3059f148097ca626 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -976,6 +976,9 @@ void GrDrawContext::internalDrawPath(const GrClip& clip,
: GrPathRendererChain::kColor_DrawType;
GrShape shape(path, style);
+ if (shape.isEmpty()) {
+ return;
+ }
GrPathRenderer::CanDrawPathArgs canDrawArgs;
canDrawArgs.fShaderCaps = fDrawingManager->getContext()->caps()->shaderCaps();
canDrawArgs.fViewMatrix = &viewMatrix;
« no previous file with comments | « no previous file | src/gpu/GrShape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698