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

Unified Diff: src/gpu/batches/GrRectBatchFactory.cpp

Issue 1936073003: When filling nested rect path check for empty inner and empty outer rects (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rm skpath.h include Created 4 years, 8 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/batches/GrAAStrokeRectBatch.cpp ('k') | tests/skbug5221.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrRectBatchFactory.cpp
diff --git a/src/gpu/batches/GrRectBatchFactory.cpp b/src/gpu/batches/GrRectBatchFactory.cpp
index f144d1b5325ec40a0f4fe25bc9dd2f1ccdc1ce87..d2ba7f4442d7a223507c9063a58ddaef69d038ce 100644
--- a/src/gpu/batches/GrRectBatchFactory.cpp
+++ b/src/gpu/batches/GrRectBatchFactory.cpp
@@ -22,9 +22,14 @@ GrDrawBatch* CreateAAFillNestedRects(GrColor color,
SkRect devOutside, devInside;
viewMatrix.mapRect(&devOutside, rects[0]);
viewMatrix.mapRect(&devInside, rects[1]);
-
- return GrAAStrokeRectBatch::Create(color, viewMatrix, devOutside, devOutside, devInside, true,
- devInside.isEmpty());
+ if (devInside.isEmpty()) {
+ if (devOutside.isEmpty()) {
+ return nullptr;
+ }
+ return GrAAFillRectBatch::Create(color, viewMatrix, devOutside, devOutside);
+ }
+
+ return GrAAStrokeRectBatch::CreateFillBetweenRects(color, viewMatrix, devOutside, devInside);
}
};
« no previous file with comments | « src/gpu/batches/GrAAStrokeRectBatch.cpp ('k') | tests/skbug5221.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698