Index: src/gpu/GrAARectRenderer.cpp |
=================================================================== |
--- src/gpu/GrAARectRenderer.cpp (revision 9089) |
+++ src/gpu/GrAARectRenderer.cpp (working copy) |
@@ -388,10 +388,10 @@ |
GrPoint* fan0Pos = reinterpret_cast<GrPoint*>(verts); |
GrPoint* fan1Pos = reinterpret_cast<GrPoint*>(verts + 4 * vsize); |
- SkRect devRect; |
- combinedMatrix.mapRect(&devRect, rect); |
+ if (combinedMatrix.rectStaysRect()) { |
+ SkRect devRect; |
+ combinedMatrix.mapRect(&devRect, rect); |
- if (combinedMatrix.rectStaysRect()) { |
set_inset_fan(fan0Pos, vsize, devRect, -SK_ScalarHalf, -SK_ScalarHalf); |
set_inset_fan(fan1Pos, vsize, devRect, SK_ScalarHalf, SK_ScalarHalf); |
} else { |
@@ -406,10 +406,14 @@ |
vec[1].normalize(); |
vec[1].scale(SK_ScalarHalf); |
+ // create the rotated rect |
fan0Pos->setRectFan(rect.fLeft, rect.fTop, |
rect.fRight, rect.fBottom, vsize); |
combinedMatrix.mapPointsWithStride(fan0Pos, vsize, 4); |
+ // Now create the inset points and then outset the original |
+ // rotated points |
+ |
// TL |
*((SkPoint*)((intptr_t)fan1Pos + 0 * vsize)) = |
*((SkPoint*)((intptr_t)fan0Pos + 0 * vsize)) + vec[0] + vec[1]; |