Added dev- & canv- prefixes to Ganesh bounding boxes to indicate coordinate space
http://codereview.appspot.com/6457061/
git-svn-id: http://skia.googlecode.com/svn/trunk@4856 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 13d6155..43e87d6 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -198,7 +198,7 @@
int generate_lines_and_quads(const SkPath& path,
const SkMatrix& m,
const SkVector& translate,
- GrIRect clip,
+ const GrIRect& devClipBounds,
PtArray* lines,
PtArray* quads,
IntArray* quadSubdivCnts) {
@@ -223,7 +223,7 @@
bounds.setBounds(devPts, 2);
bounds.outset(SK_Scalar1, SK_Scalar1);
bounds.roundOut(&ibounds);
- if (SkIRect::Intersects(clip, ibounds)) {
+ if (SkIRect::Intersects(devClipBounds, ibounds)) {
SkPoint* pts = lines->push_back_n(2);
pts[0] = devPts[0];
pts[1] = devPts[1];
@@ -235,7 +235,7 @@
bounds.setBounds(devPts, 3);
bounds.outset(SK_Scalar1, SK_Scalar1);
bounds.roundOut(&ibounds);
- if (SkIRect::Intersects(clip, ibounds)) {
+ if (SkIRect::Intersects(devClipBounds, ibounds)) {
int subdiv = num_quad_subdivs(devPts);
GrAssert(subdiv >= -1);
if (-1 == subdiv) {
@@ -262,7 +262,7 @@
bounds.setBounds(devPts, 4);
bounds.outset(SK_Scalar1, SK_Scalar1);
bounds.roundOut(&ibounds);
- if (SkIRect::Intersects(clip, ibounds)) {
+ if (SkIRect::Intersects(devClipBounds, ibounds)) {
PREALLOC_PTARRAY(32) q;
// we don't need a direction if we aren't constraining the subdivision
static const SkPath::Direction kDummyDir = SkPath::kCCW_Direction;
@@ -290,7 +290,7 @@
}
bounds.outset(SK_Scalar1, SK_Scalar1);
bounds.roundOut(&ibounds);
- if (SkIRect::Intersects(clip, ibounds)) {
+ if (SkIRect::Intersects(devClipBounds, ibounds)) {
int subdiv = num_quad_subdivs(qInDevSpace);
GrAssert(subdiv >= -1);
if (-1 == subdiv) {
@@ -511,8 +511,9 @@
const GrDrawState& drawState = target->getDrawState();
int rtHeight = drawState.getRenderTarget()->height();
- GrIRect clip;
- target->getClip()->getConservativeBounds(drawState.getRenderTarget(), &clip);
+ GrIRect devClipBounds;
+ target->getClip()->getConservativeBounds(drawState.getRenderTarget(),
+ &devClipBounds);
GrVertexLayout layout = GrDrawTarget::kEdge_VertexLayoutBit;
GrMatrix viewM = drawState.getViewMatrix();
@@ -524,7 +525,7 @@
if (NULL == translate) {
translate = &gZeroVec;
}
- *quadCnt = generate_lines_and_quads(path, viewM, *translate, clip,
+ *quadCnt = generate_lines_and_quads(path, viewM, *translate, devClipBounds,
&lines, &quads, &qSubdivs);
*lineCnt = lines.count() / 2;