If we compute an exact clip bounds prefer it over user passed bounds. Also clarify that bounds are conservative.
Review URL: http://codereview.appspot.com/4254063/
git-svn-id: http://skia.googlecode.com/svn/trunk@909 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrTextContext.cpp b/gpu/src/GrTextContext.cpp
index 802e3e3..6819bde 100644
--- a/gpu/src/GrTextContext.cpp
+++ b/gpu/src/GrTextContext.cpp
@@ -73,16 +73,16 @@
} else {
fExtMatrix = GrMatrix::I();
}
- if (context->getClip().hasBounds()) {
+ if (context->getClip().hasConservativeBounds()) {
if (!fExtMatrix.isIdentity()) {
GrMatrix inverse;
- GrRect r = context->getClip().getBounds();
+ GrRect r = context->getClip().getConservativeBounds();
if (fExtMatrix.invert(&inverse)) {
inverse.mapRect(&r);
r.roundOut(&fClipRect);
}
} else {
- context->getClip().getBounds().roundOut(&fClipRect);
+ context->getClip().getConservativeBounds().roundOut(&fClipRect);
}
} else {
fClipRect.setLargest();