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

Unified Diff: src/gpu/GrAARectRenderer.cpp

Issue 14820035: Re-add isIRect test for AA rect drawing (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | « include/gpu/GrAARectRenderer.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAARectRenderer.cpp
===================================================================
--- src/gpu/GrAARectRenderer.cpp (revision 9127)
+++ src/gpu/GrAARectRenderer.cpp (working copy)
@@ -364,6 +364,7 @@
GrDrawTarget* target,
const GrRect& rect,
const SkMatrix& combinedMatrix,
+ const GrRect& devRect,
bool useVertexCoverage) {
GrDrawState* drawState = target->drawState();
@@ -389,8 +390,10 @@
GrPoint* fan1Pos = reinterpret_cast<GrPoint*>(verts + 4 * vsize);
if (combinedMatrix.rectStaysRect()) {
+#if 0
bsalomon 2013/05/14 19:36:27 Maybe a comment here (and below) about why this wa
robertphillips 2013/05/14 19:48:05 Done.
SkRect devRect;
combinedMatrix.mapRect(&devRect, rect);
+#endif
set_inset_fan(fan0Pos, vsize, devRect, -SK_ScalarHalf, -SK_ScalarHalf);
set_inset_fan(fan1Pos, vsize, devRect, SK_ScalarHalf, SK_ScalarHalf);
@@ -628,6 +631,7 @@
GrDrawTarget* target,
const GrRect& rect,
const SkMatrix& combinedMatrix,
+ const GrRect& devRect,
const GrVec& devStrokeSize,
bool useVertexCoverage) {
GrDrawState* drawState = target->drawState();
@@ -637,8 +641,10 @@
const SkScalar rx = SkScalarMul(dx, SK_ScalarHalf);
const SkScalar ry = SkScalarMul(dy, SK_ScalarHalf);
+#if 0
SkRect devRect;
combinedMatrix.mapRect(&devRect, rect);
+#endif
SkScalar spare;
{
@@ -648,8 +654,9 @@
}
if (spare <= 0) {
- devRect.inset(-rx, -ry);
- this->fillAARect(gpu, target, devRect, SkMatrix::I(), useVertexCoverage);
+ GrRect r(devRect);
+ r.outset(rx, ry);
+ this->fillAARect(gpu, target, r, SkMatrix::I(), r, useVertexCoverage);
return;
}
« no previous file with comments | « include/gpu/GrAARectRenderer.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698