Home | History | Annotate | Download | only in hwui

Lines Matching refs:state

69     virtual void add(DrawOp* op, const DeferredDisplayState* state, bool opaqueOverBounds) {
71 mBounds.unionWith(state->mBounds);
73 mOps.add(OpStatePair(op, state));
80 if (rect.intersects(mOps[i].state->mBounds)) {
83 mOps[i].state->mBounds.left, mOps[i].state->mBounds.top,
84 mOps[i].state->mBounds.right, mOps[i].state->mBounds.bottom);
101 const DeferredDisplayState* state = mOps[i].state;
102 renderer.restoreDisplayState(*state);
111 const Rect& bounds = state->mBounds;
130 const Rect &r = mOps[i].state->mBounds;
187 bool canMergeWith(const DrawOp* op, const DeferredDisplayState* state) {
193 if (!isTextBatch || state->mDrawModifiers.mHasShadow) {
194 if (intersects(state->mBounds)) return false;
196 const DeferredDisplayState* lhs = state;
197 const DeferredDisplayState* rhs = mOps[0].state;
207 const int newFlags = state->mClipSideFlags;
209 const Rect& opBounds = state->mBounds;
252 virtual void add(DrawOp* op, const DeferredDisplayState* state, bool opaqueOverBounds) {
253 DrawBatch::add(op, state, opaqueOverBounds);
255 const int newClipSideFlags = state->mClipSideFlags;
257 if (newClipSideFlags & kClipSide_Left) mClipRect.left = state->mClip.left;
258 if (newClipSideFlags & kClipSide_Top) mClipRect.top = state->mClip.top;
259 if (newClipSideFlags & kClipSide_Right) mClipRect.right = state->mClip.right;
260 if (newClipSideFlags & kClipSide_Bottom) mClipRect.bottom = state->mClip.bottom;
305 StateOpBatch(const StateOp* op, const DeferredDisplayState* state) : mOp(op), mState(state) {}
308 DEFER_LOGD("replaying state op batch %p", this);
326 RestoreToCountBatch(const StateOp* op, const DeferredDisplayState* state, int restoreCount) :
327 mOp(op), mState(state), mRestoreCount(restoreCount) {}
338 // we use the state storage for the RestoreToCountOp, but don't replay the op itself
407 * the clip from deferred state, we play back all of the relevant state operations that generated
493 DeferredDisplayState* const state = createState();
494 if (op->getLocalBounds(renderer.getDrawModifiers(), state->mBounds)) {
495 if (state->mBounds.isEmpty()) {
497 tryRecycleState(state);
501 state->mBounds.setEmpty();
504 /* 2: renderer calculates global bounds + stores state */
505 if (renderer.storeDisplayState(*state, getDrawOpDeferFlags())) {
506 tryRecycleState(state);
510 /* 3: ask op for defer info, given renderer state */
512 op->onDefer(renderer, deferInfo, *state);
514 // complex clip has a complex set of expectations on the renderer state - for now, avoid taking
520 state->mClipSideFlags != kClipSide_ConservativeFull &&
521 deferInfo.opaqueOverBounds && state->mBounds.contains(mBounds)) {
522 // avoid overdraw by resetting drawing state + discarding drawing ops
530 b->add(op, state, deferInfo.opaqueOverBounds);
542 if (state->mBounds.isEmpty()) {
545 b->add(op, state, deferInfo.opaqueOverBounds);
558 if (!((MergingDrawBatch*) targetBatch)->canMergeWith(op, state)) {
581 if (overBatch->intersects(state->mBounds)) {
613 targetBatch->add(op, state, deferInfo.opaqueOverBounds);
617 DEFER_LOGD("%p adding state op barrier at pos %d", this, mBatches.size());
619 DeferredDisplayState* state = createState();
620 renderer.storeDisplayState(*state, getStateOpDeferFlags());
621 mBatches.add(new StateOpBatch(op, state));
632 DeferredDisplayState* state = createState();
633 renderer.storeDisplayState(*state, getStateOpDeferFlags());
634 mBatches.add(new RestoreToCountBatch(op, state, newSaveCount));
667 // save and restore (with draw modifiers) so that reordering doesn't affect final state
692 // leave deferred state ops alone for simplicity (empty save restore pairs may now exist)