Turn clipping back on in OSAA pass 1. Skip default cons on GrDrawState when saving off a GrDrawTarget's state.
Review URL: http://codereview.appspot.com/5553051/
git-svn-id: http://skia.googlecode.com/svn/trunk@3067 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 0a3ab42..2137319 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -769,13 +769,12 @@
GrRenderTarget* offRT = record->fOffscreen.texture()->asRenderTarget();
GrAssert(NULL != offRT);
-
GrDrawState* drawState = target->drawState();
GrMatrix vm = drawState->getViewMatrix();
drawState->reset();
*drawState->viewMatrix() = vm;
drawState->setRenderTarget(offRT);
-
+
#if PREFER_MSAA_OFFSCREEN_AA
drawState->enableState(GrDrawState::kHWAntialias_StateBit);
#endif
@@ -796,6 +795,8 @@
GrIRect clear = SkIRect::MakeWH(record->fScale * w,
record->fScale * h);
target->setClip(GrClip(clear));
+ drawState->enableState(GrDrawState::kClip_StateBit);
+
#if 0
// visualize tile boundaries by setting edges of offscreen to white
// and interior to tranparent. black.