Lines Matching refs:state
129 if (update.state.surfaceControl == NULL && update.state.wantSurfaceVisible()) { in doUpdateSprites()
130 update.state.surfaceWidth = update.state.icon.width(); in doUpdateSprites()
131 update.state.surfaceHeight = update.state.icon.height(); in doUpdateSprites()
132 update.state.surfaceDrawn = false; in doUpdateSprites()
133 update.state.surfaceVisible = false; in doUpdateSprites()
134 update.state.surfaceControl = obtainSurface( in doUpdateSprites()
135 update.state.surfaceWidth, update.state.surfaceHeight); in doUpdateSprites()
136 if (update.state.surfaceControl != NULL) { in doUpdateSprites()
147 if (update.state.surfaceControl == nullptr) { in doUpdateSprites()
151 if (update.state.wantSurfaceVisible()) { in doUpdateSprites()
152 int32_t desiredWidth = update.state.icon.width(); in doUpdateSprites()
153 int32_t desiredHeight = update.state.icon.height(); in doUpdateSprites()
154 if (update.state.surfaceWidth < desiredWidth in doUpdateSprites()
155 || update.state.surfaceHeight < desiredHeight) { in doUpdateSprites()
158 update.state.surfaceControl->updateDefaultBufferSize(desiredWidth, desiredHeight); in doUpdateSprites()
159 update.state.surfaceWidth = desiredWidth; in doUpdateSprites()
160 update.state.surfaceHeight = desiredHeight; in doUpdateSprites()
161 update.state.surfaceDrawn = false; in doUpdateSprites()
164 if (update.state.surfaceVisible) { in doUpdateSprites()
165 t.hide(update.state.surfaceControl); in doUpdateSprites()
166 update.state.surfaceVisible = false; in doUpdateSprites()
172 if (update.surfaceChanged || update.state.dirty & DIRTY_DISPLAY_ID) { in doUpdateSprites()
173 t.reparent(update.state.surfaceControl, mParentSurfaceProvider(update.state.displayId)); in doUpdateSprites()
185 if ((update.state.dirty & DIRTY_BITMAP) && update.state.surfaceDrawn) { in doUpdateSprites()
186 update.state.surfaceDrawn = false; in doUpdateSprites()
190 if (update.state.surfaceControl != NULL && !update.state.surfaceDrawn in doUpdateSprites()
191 && update.state.wantSurfaceVisible()) { in doUpdateSprites()
192 sp<Surface> surface = update.state.surfaceControl->getSurface(); in doUpdateSprites()
193 if (update.state.icon.draw(surface)) { in doUpdateSprites()
194 update.state.surfaceDrawn = true; in doUpdateSprites()
204 bool wantSurfaceVisibleAndDrawn = update.state.wantSurfaceVisible() in doUpdateSprites()
205 && update.state.surfaceDrawn; in doUpdateSprites()
206 bool becomingVisible = wantSurfaceVisibleAndDrawn && !update.state.surfaceVisible; in doUpdateSprites()
207 bool becomingHidden = !wantSurfaceVisibleAndDrawn && update.state.surfaceVisible; in doUpdateSprites()
208 if (update.state.surfaceControl != NULL && (becomingVisible || becomingHidden in doUpdateSprites()
209 || (wantSurfaceVisibleAndDrawn && (update.state.dirty & (DIRTY_ALPHA in doUpdateSprites()
216 && (becomingVisible || (update.state.dirty & DIRTY_ALPHA))) { in doUpdateSprites()
217 t.setAlpha(update.state.surfaceControl, in doUpdateSprites()
218 update.state.alpha); in doUpdateSprites()
222 && (becomingVisible || (update.state.dirty & (DIRTY_POSITION in doUpdateSprites()
225 update.state.surfaceControl, in doUpdateSprites()
226 update.state.positionX - update.state.icon.hotSpotX, in doUpdateSprites()
227 update.state.positionY - update.state.icon.hotSpotY); in doUpdateSprites()
232 || (update.state.dirty & DIRTY_TRANSFORMATION_MATRIX))) { in doUpdateSprites()
234 update.state.surfaceControl, in doUpdateSprites()
235 update.state.transformationMatrix.dsdx, in doUpdateSprites()
236 update.state.transformationMatrix.dtdx, in doUpdateSprites()
237 update.state.transformationMatrix.dsdy, in doUpdateSprites()
238 update.state.transformationMatrix.dtdy); in doUpdateSprites()
243 || (update.state.dirty & (DIRTY_HOTSPOT | DIRTY_ICON_STYLE)))) { in doUpdateSprites()
245 p.writeInt32(update.state.icon.style); in doUpdateSprites()
246 p.writeFloat(update.state.icon.hotSpotX); in doUpdateSprites()
247 p.writeFloat(update.state.icon.hotSpotY); in doUpdateSprites()
253 update.state.surfaceControl, METADATA_MOUSE_CURSOR, p); in doUpdateSprites()
256 int32_t surfaceLayer = mOverlayLayer + update.state.layer; in doUpdateSprites()
258 && (becomingVisible || (update.state.dirty & DIRTY_LAYER))) { in doUpdateSprites()
259 t.setLayer(update.state.surfaceControl, surfaceLayer); in doUpdateSprites()
263 t.show(update.state.surfaceControl); in doUpdateSprites()
265 update.state.surfaceVisible = true; in doUpdateSprites()
268 t.hide(update.state.surfaceControl); in doUpdateSprites()
270 update.state.surfaceVisible = false; in doUpdateSprites()
291 update.sprite->setSurfaceLocked(update.state.surfaceControl, in doUpdateSprites()
292 update.state.surfaceWidth, update.state.surfaceHeight, in doUpdateSprites()
293 update.state.surfaceDrawn, update.state.surfaceVisible); in doUpdateSprites()
360 if (mLocked.state.surfaceControl != NULL) { in ~SpriteImpl()
361 mController->disposeSurfaceLocked(mLocked.state.surfaceControl); in ~SpriteImpl()
362 mLocked.state.surfaceControl.clear(); in ~SpriteImpl()
371 mLocked.state.icon.bitmap = icon.bitmap.copy(ANDROID_BITMAP_FORMAT_RGBA_8888); in setIcon()
372 if (!mLocked.state.icon.isValid() in setIcon()
373 || mLocked.state.icon.hotSpotX != icon.hotSpotX in setIcon()
374 || mLocked.state.icon.hotSpotY != icon.hotSpotY) { in setIcon()
375 mLocked.state.icon.hotSpotX = icon.hotSpotX; in setIcon()
376 mLocked.state.icon.hotSpotY = icon.hotSpotY; in setIcon()
382 if (mLocked.state.icon.style != icon.style) { in setIcon()
383 mLocked.state.icon.style = icon.style; in setIcon()
386 } else if (mLocked.state.icon.isValid()) { in setIcon()
387 mLocked.state.icon.bitmap.reset(); in setIcon()
399 if (mLocked.state.visible != visible) { in setVisible()
400 mLocked.state.visible = visible; in setVisible()
408 if (mLocked.state.positionX != x || mLocked.state.positionY != y) { in setPosition()
409 mLocked.state.positionX = x; in setPosition()
410 mLocked.state.positionY = y; in setPosition()
418 if (mLocked.state.layer != layer) { in setLayer()
419 mLocked.state.layer = layer; in setLayer()
427 if (mLocked.state.alpha != alpha) { in setAlpha()
428 mLocked.state.alpha = alpha; in setAlpha()
437 if (mLocked.state.transformationMatrix != matrix) { in setTransformationMatrix()
438 mLocked.state.transformationMatrix = matrix; in setTransformationMatrix()
446 if (mLocked.state.displayId != displayId) { in setDisplayId()
447 mLocked.state.displayId = displayId; in setDisplayId()
453 bool wasDirty = mLocked.state.dirty; in invalidateLocked()
454 mLocked.state.dirty |= dirty; in invalidateLocked()