Fixed bug(s) in batching of rects

https://codereview.appspot.com/6608043/



git-svn-id: http://skia.googlecode.com/svn/trunk@5811 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2012-10-04 17:57:05 +00:00
parent 7823d9a07f
commit 837ec432cc
2 changed files with 7 additions and 2 deletions

View File

@ -569,7 +569,12 @@ const GrClipData* GrContext::getClip() const {
void GrContext::setClip(const GrClipData* clipData) {
fGpu->setClip(clipData);
fDrawState->enableState(GrDrawState::kClip_StateBit);
if (clipData->fClipStack->isWideOpen()) {
fDrawState->disableState(GrDrawState::kClip_StateBit);
} else {
fDrawState->enableState(GrDrawState::kClip_StateBit);
}
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -190,7 +190,7 @@ void GrInOrderDrawBuffer::drawRect(const GrRect& rect,
GeometryPoolState& poolState = fGeoPoolStateStack.back();
appendToPreviousDraw =
kDraw_Cmd != fCmds.back() &&
kDraw_Cmd == fCmds.back() &&
lastDraw.fVertexBuffer == poolState.fPoolVertexBuffer &&
(fCurrQuad * 4 + lastDraw.fStartVertex) == poolState.fPoolStartVertex;