Forced GrClip to always have conservative bounds

http://codereview.appspot.com/6353089/



git-svn-id: http://skia.googlecode.com/svn/trunk@4545 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index b004f28..6e92bf7 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1836,7 +1836,9 @@
     srcRect.roundOut();
     scale_rect(&srcRect, static_cast<float>(scaleFactorX), 
                          static_cast<float>(scaleFactorY));
-    this->setClip(srcRect);
+
+    GrClip newClip(srcRect);
+    this->setClip(newClip);
 
     GrAssert(kBGRA_8888_PM_GrPixelConfig == srcTexture->config() ||
              kRGBA_8888_PM_GrPixelConfig == srcTexture->config() ||
@@ -1949,8 +1951,11 @@
     GrRenderTarget* oldRenderTarget = this->getRenderTarget();
     GrAutoMatrix avm(this, GrMatrix::I());
     GrClip oldClip = this->getClip();
-    this->setClip(GrRect::MakeWH(SkIntToScalar(srcTexture->width()), 
-                                 SkIntToScalar(srcTexture->height())));
+
+    GrClip newClip(GrRect::MakeWH(SkIntToScalar(srcTexture->width()), 
+                                  SkIntToScalar(srcTexture->height())));
+    this->setClip(newClip);
+
     if (radius.fWidth > 0) {
         this->setRenderTarget(temp1->asRenderTarget());
         apply_morphology(fGpu, srcTexture, rect, radius.fWidth, morphType,