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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1345853005: Move determiniation of strokerect rects internal (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerectfix
Patch Set: comment fixed Created 5 years, 3 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/batches/GrAAStrokeRectBatch.h » ('j') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('J')
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 94fcee03134a375d00b199440c4aac10ac7b1518..1969bd03be29063f62139f16bb4e246aad63ba9e 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -273,13 +273,12 @@ void GrDrawContext::drawRect(GrRenderTarget* rt,
if (needAA && canApplyAA) {
SkASSERT(!viewMatrix.hasPerspective());
- SkRect devBoundRect;
- viewMatrix.mapRect(&devBoundRect, rect);
SkAutoTUnref<GrDrawBatch> batch;
if (width >= 0) {
- batch.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, rect, devBoundRect,
- *strokeInfo));
+ batch.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, rect, *strokeInfo));
} else {
+ SkRect devBoundRect;
+ viewMatrix.mapRect(&devBoundRect, rect);
batch.reset(GrRectBatchFactory::CreateAAFill(color, viewMatrix, rect, devBoundRect));
}
fDrawTarget->drawBatch(pipelineBuilder, batch);
« no previous file with comments | « no previous file | src/gpu/batches/GrAAStrokeRectBatch.h » ('j') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698