GrTextureEntry* fEntry0;
GrTextureEntry* fEntry1;
GrDrawTarget::SavedDrawState fSavedState;
+ GrClip fClip;
};
bool GrContext::doOffscreenAA(GrDrawTarget* target,
record->fTileCountX = GrIDivRoundUp(boundW, record->fTileSizeX);
record->fTileCountY = GrIDivRoundUp(boundH, record->fTileSizeY);
+ record->fClip = target->getClip();
+
target->saveCurrentDrawState(&record->fSavedState);
return true;
}
scaleM.setScale(record->fScale * GR_Scalar1, record->fScale * GR_Scalar1);
target->postConcatViewMatrix(scaleM);
- // clip gets applied in second pass
- target->disableState(GrDrawTarget::kClip_StateBit);
-
int w = (tileX == record->fTileCountX-1) ? boundRect.fRight - left :
record->fTileSizeX;
int h = (tileY == record->fTileCountY-1) ? boundRect.fBottom - top :
record->fTileSizeY;
GrIRect clear = SkIRect::MakeWH(record->fScale * w,
record->fScale * h);
+ target->setClip(GrClip(clear));
#if 0
// visualize tile boundaries by setting edges of offscreen to white
// and interior to tranparent. black.
int stageMask = paint.getActiveStageMask();
target->restoreDrawState(record->fSavedState);
+ target->setClip(record->fClip);
if (stageMask) {
GrMatrix invVM;