Lines Matching refs:state

132         if (update.state.surfaceControl == NULL && update.state.wantSurfaceVisible()) {  in doUpdateSprites()
133 update.state.surfaceWidth = update.state.icon.bitmap.getInfo().width; in doUpdateSprites()
134 update.state.surfaceHeight = update.state.icon.bitmap.getInfo().height; in doUpdateSprites()
135 update.state.surfaceDrawn = false; in doUpdateSprites()
136 update.state.surfaceVisible = false; in doUpdateSprites()
137 update.state.surfaceControl = obtainSurface( in doUpdateSprites()
138 update.state.surfaceWidth, update.state.surfaceHeight); in doUpdateSprites()
139 if (update.state.surfaceControl != NULL) { in doUpdateSprites()
150 if (update.state.surfaceControl == nullptr) { in doUpdateSprites()
154 if (update.state.wantSurfaceVisible()) { in doUpdateSprites()
155 int32_t desiredWidth = update.state.icon.bitmap.getInfo().width; in doUpdateSprites()
156 int32_t desiredHeight = update.state.icon.bitmap.getInfo().height; in doUpdateSprites()
157 if (update.state.surfaceWidth < desiredWidth in doUpdateSprites()
158 || update.state.surfaceHeight < desiredHeight) { in doUpdateSprites()
161 t.setSize(update.state.surfaceControl, in doUpdateSprites()
163 update.state.surfaceWidth = desiredWidth; in doUpdateSprites()
164 update.state.surfaceHeight = desiredHeight; in doUpdateSprites()
165 update.state.surfaceDrawn = false; in doUpdateSprites()
168 if (update.state.surfaceVisible) { in doUpdateSprites()
169 t.hide(update.state.surfaceControl); in doUpdateSprites()
170 update.state.surfaceVisible = false; in doUpdateSprites()
176 if (update.surfaceChanged || update.state.dirty & DIRTY_DISPLAY_ID) { in doUpdateSprites()
177 t.setLayerStack(update.state.surfaceControl, update.state.displayId); in doUpdateSprites()
189 if ((update.state.dirty & DIRTY_BITMAP) && update.state.surfaceDrawn) { in doUpdateSprites()
190 update.state.surfaceDrawn = false; in doUpdateSprites()
194 if (update.state.surfaceControl != NULL && !update.state.surfaceDrawn in doUpdateSprites()
195 && update.state.wantSurfaceVisible()) { in doUpdateSprites()
196 sp<Surface> surface = update.state.surfaceControl->getSurface(); in doUpdateSprites()
206 canvas.drawBitmap(update.state.icon.bitmap, 0, 0, &paint); in doUpdateSprites()
208 const int iconWidth = update.state.icon.bitmap.getInfo().width; in doUpdateSprites()
209 const int iconHeight = update.state.icon.bitmap.getInfo().height; in doUpdateSprites()
224 update.state.surfaceDrawn = true; in doUpdateSprites()
235 bool wantSurfaceVisibleAndDrawn = update.state.wantSurfaceVisible() in doUpdateSprites()
236 && update.state.surfaceDrawn; in doUpdateSprites()
237 bool becomingVisible = wantSurfaceVisibleAndDrawn && !update.state.surfaceVisible; in doUpdateSprites()
238 bool becomingHidden = !wantSurfaceVisibleAndDrawn && update.state.surfaceVisible; in doUpdateSprites()
239 if (update.state.surfaceControl != NULL && (becomingVisible || becomingHidden in doUpdateSprites()
240 || (wantSurfaceVisibleAndDrawn && (update.state.dirty & (DIRTY_ALPHA in doUpdateSprites()
247 && (becomingVisible || (update.state.dirty & DIRTY_ALPHA))) { in doUpdateSprites()
248 t.setAlpha(update.state.surfaceControl, in doUpdateSprites()
249 update.state.alpha); in doUpdateSprites()
253 && (becomingVisible || (update.state.dirty & (DIRTY_POSITION in doUpdateSprites()
256 update.state.surfaceControl, in doUpdateSprites()
257 update.state.positionX - update.state.icon.hotSpotX, in doUpdateSprites()
258 update.state.positionY - update.state.icon.hotSpotY); in doUpdateSprites()
263 || (update.state.dirty & DIRTY_TRANSFORMATION_MATRIX))) { in doUpdateSprites()
265 update.state.surfaceControl, in doUpdateSprites()
266 update.state.transformationMatrix.dsdx, in doUpdateSprites()
267 update.state.transformationMatrix.dtdx, in doUpdateSprites()
268 update.state.transformationMatrix.dsdy, in doUpdateSprites()
269 update.state.transformationMatrix.dtdy); in doUpdateSprites()
274 || (update.state.dirty & (DIRTY_HOTSPOT | DIRTY_ICON_STYLE)))) { in doUpdateSprites()
276 p.writeInt32(update.state.icon.style); in doUpdateSprites()
277 p.writeFloat(update.state.icon.hotSpotX); in doUpdateSprites()
278 p.writeFloat(update.state.icon.hotSpotY); in doUpdateSprites()
284 update.state.surfaceControl, METADATA_MOUSE_CURSOR, p); in doUpdateSprites()
287 int32_t surfaceLayer = mOverlayLayer + update.state.layer; in doUpdateSprites()
289 && (becomingVisible || (update.state.dirty & DIRTY_LAYER))) { in doUpdateSprites()
290 t.setLayer(update.state.surfaceControl, surfaceLayer); in doUpdateSprites()
294 t.show(update.state.surfaceControl); in doUpdateSprites()
296 update.state.surfaceVisible = true; in doUpdateSprites()
299 t.hide(update.state.surfaceControl); in doUpdateSprites()
301 update.state.surfaceVisible = false; in doUpdateSprites()
322 update.sprite->setSurfaceLocked(update.state.surfaceControl, in doUpdateSprites()
323 update.state.surfaceWidth, update.state.surfaceHeight, in doUpdateSprites()
324 update.state.surfaceDrawn, update.state.surfaceVisible); in doUpdateSprites()
384 if (mLocked.state.surfaceControl != NULL) { in ~SpriteImpl()
385 mController->disposeSurfaceLocked(mLocked.state.surfaceControl); in ~SpriteImpl()
386 mLocked.state.surfaceControl.clear(); in ~SpriteImpl()
395 mLocked.state.icon.bitmap = icon.bitmap.copy(ANDROID_BITMAP_FORMAT_RGBA_8888); in setIcon()
396 if (!mLocked.state.icon.isValid() in setIcon()
397 || mLocked.state.icon.hotSpotX != icon.hotSpotX in setIcon()
398 || mLocked.state.icon.hotSpotY != icon.hotSpotY) { in setIcon()
399 mLocked.state.icon.hotSpotX = icon.hotSpotX; in setIcon()
400 mLocked.state.icon.hotSpotY = icon.hotSpotY; in setIcon()
406 if (mLocked.state.icon.style != icon.style) { in setIcon()
407 mLocked.state.icon.style = icon.style; in setIcon()
410 } else if (mLocked.state.icon.isValid()) { in setIcon()
411 mLocked.state.icon.bitmap.reset(); in setIcon()
423 if (mLocked.state.visible != visible) { in setVisible()
424 mLocked.state.visible = visible; in setVisible()
432 if (mLocked.state.positionX != x || mLocked.state.positionY != y) { in setPosition()
433 mLocked.state.positionX = x; in setPosition()
434 mLocked.state.positionY = y; in setPosition()
442 if (mLocked.state.layer != layer) { in setLayer()
443 mLocked.state.layer = layer; in setLayer()
451 if (mLocked.state.alpha != alpha) { in setAlpha()
452 mLocked.state.alpha = alpha; in setAlpha()
461 if (mLocked.state.transformationMatrix != matrix) { in setTransformationMatrix()
462 mLocked.state.transformationMatrix = matrix; in setTransformationMatrix()
470 if (mLocked.state.displayId != displayId) { in setDisplayId()
471 mLocked.state.displayId = displayId; in setDisplayId()
477 bool wasDirty = mLocked.state.dirty; in invalidateLocked()
478 mLocked.state.dirty |= dirty; in invalidateLocked()