Lines Matching refs:state
69 virtual void add(DrawOp* op, const DeferredDisplayState* state, bool opaqueOverBounds) { in add() argument
71 mBounds.unionWith(state->mBounds); in add()
73 mOps.add(OpStatePair(op, state)); in add()
80 if (rect.intersects(mOps[i].state->mBounds)) { in intersects()
83 mOps[i].state->mBounds.left, mOps[i].state->mBounds.top, in intersects()
84 mOps[i].state->mBounds.right, mOps[i].state->mBounds.bottom); in intersects()
101 const DeferredDisplayState* state = mOps[i].state; in replay() local
102 renderer.restoreDisplayState(*state); in replay()
111 const Rect& bounds = state->mBounds; in replay()
130 const Rect &r = mOps[i].state->mBounds; in coversBounds()
187 bool canMergeWith(const DrawOp* op, const DeferredDisplayState* state) { in canMergeWith() argument
193 if (!isTextBatch || state->mDrawModifiers.mHasShadow) { in canMergeWith()
194 if (intersects(state->mBounds)) return false; in canMergeWith()
196 const DeferredDisplayState* lhs = state; in canMergeWith()
197 const DeferredDisplayState* rhs = mOps[0].state; in canMergeWith()
207 const int newFlags = state->mClipSideFlags; in canMergeWith()
209 const Rect& opBounds = state->mBounds; in canMergeWith()
252 virtual void add(DrawOp* op, const DeferredDisplayState* state, bool opaqueOverBounds) { in add() argument
253 DrawBatch::add(op, state, opaqueOverBounds); in add()
255 const int newClipSideFlags = state->mClipSideFlags; in add()
257 if (newClipSideFlags & kClipSide_Left) mClipRect.left = state->mClip.left; in add()
258 if (newClipSideFlags & kClipSide_Top) mClipRect.top = state->mClip.top; in add()
259 if (newClipSideFlags & kClipSide_Right) mClipRect.right = state->mClip.right; in add()
260 if (newClipSideFlags & kClipSide_Bottom) mClipRect.bottom = state->mClip.bottom; in add()
305 StateOpBatch(const StateOp* op, const DeferredDisplayState* state) : mOp(op), mState(state) {} in StateOpBatch() argument
326 RestoreToCountBatch(const StateOp* op, const DeferredDisplayState* state, int restoreCount) : in RestoreToCountBatch() argument
327 mOp(op), mState(state), mRestoreCount(restoreCount) {} in RestoreToCountBatch()
493 DeferredDisplayState* const state = createState(); in addDrawOp() local
494 if (op->getLocalBounds(renderer.getDrawModifiers(), state->mBounds)) { in addDrawOp()
495 if (state->mBounds.isEmpty()) { in addDrawOp()
497 tryRecycleState(state); in addDrawOp()
501 state->mBounds.setEmpty(); in addDrawOp()
505 if (renderer.storeDisplayState(*state, getDrawOpDeferFlags())) { in addDrawOp()
506 tryRecycleState(state); in addDrawOp()
512 op->onDefer(renderer, deferInfo, *state); in addDrawOp()
520 state->mClipSideFlags != kClipSide_ConservativeFull && in addDrawOp()
521 deferInfo.opaqueOverBounds && state->mBounds.contains(mBounds)) { in addDrawOp()
530 b->add(op, state, deferInfo.opaqueOverBounds); in addDrawOp()
542 if (state->mBounds.isEmpty()) { in addDrawOp()
545 b->add(op, state, deferInfo.opaqueOverBounds); in addDrawOp()
558 if (!((MergingDrawBatch*) targetBatch)->canMergeWith(op, state)) { in addDrawOp()
581 if (overBatch->intersects(state->mBounds)) { in addDrawOp()
613 targetBatch->add(op, state, deferInfo.opaqueOverBounds); in addDrawOp()
619 DeferredDisplayState* state = createState(); in storeStateOpBarrier() local
620 renderer.storeDisplayState(*state, getStateOpDeferFlags()); in storeStateOpBarrier()
621 mBatches.add(new StateOpBatch(op, state)); in storeStateOpBarrier()
632 DeferredDisplayState* state = createState(); in storeRestoreToCountBarrier() local
633 renderer.storeDisplayState(*state, getStateOpDeferFlags()); in storeRestoreToCountBarrier()
634 mBatches.add(new RestoreToCountBatch(op, state, newSaveCount)); in storeRestoreToCountBarrier()