Merge "Fix scissor for functor invocation" into klp-dev

This commit is contained in:
John Reck
2013-09-10 21:03:48 +00:00
committed by Android (Google) Code Review

View File

@@ -471,12 +471,14 @@ status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
info.height = getSnapshot()->height;
getSnapshot()->transform->copyTo(&info.transform[0]);
bool dirtyClip = mDirtyClip;
// setup GL state for functor
if (mDirtyClip) {
setScissorFromClip();
setStencilFromClip(); // can issue draws, so must precede enableScissor()/interrupt()
}
mCaches.enableScissor();
if (mCaches.enableScissor() || dirtyClip) {
setScissorFromClip();
}
interrupt();
// call functor immediately after GL state setup