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

Unified Diff: src/gpu/GrAARectRenderer.cpp

Issue 1135753004: Fix GrAARectRenderer's handling of unsorted nested rects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « gm/nested.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAARectRenderer.cpp
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp
index 9243e212e4a0c5ee66a40bb7a64a9630faa125a6..a4656a7c3e513f6835a9f77450402393c82fe589 100644
--- a/src/gpu/GrAARectRenderer.cpp
+++ b/src/gpu/GrAARectRenderer.cpp
@@ -808,12 +808,11 @@ void GrAARectRenderer::fillAANestedRects(GrDrawTarget* target,
const SkMatrix& viewMatrix,
const SkRect rects[2]) {
SkASSERT(viewMatrix.rectStaysRect());
- SkASSERT(!rects[1].isEmpty());
+ SkASSERT(!rects[0].isEmpty() && !rects[1].isEmpty());
SkRect devOutside, devInside;
viewMatrix.mapRect(&devOutside, rects[0]);
- // can't call mapRect for devInside since it calls sort
- viewMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2);
+ viewMatrix.mapRect(&devInside, rects[1]);
if (devInside.isEmpty()) {
this->fillAARect(target, pipelineBuilder, color, viewMatrix, devOutside, devOutside);
« no previous file with comments | « gm/nested.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698