Lines Matching full:state
133 if (update.state.surfaceControl == NULL && update.state.wantSurfaceVisible()) {
134 update.state.surfaceWidth = update.state.icon.bitmap.width();
135 update.state.surfaceHeight = update.state.icon.bitmap.height();
136 update.state.surfaceDrawn = false;
137 update.state.surfaceVisible = false;
138 update.state.surfaceControl = obtainSurface(
139 update.state.surfaceWidth, update.state.surfaceHeight);
140 if (update.state.surfaceControl != NULL) {
151 if (update.state.surfaceControl != NULL && update.state.wantSurfaceVisible()) {
152 int32_t desiredWidth = update.state.icon.bitmap.width();
153 int32_t desiredHeight = update.state.icon.bitmap.height();
154 if (update.state.surfaceWidth < desiredWidth
155 || update.state.surfaceHeight < desiredHeight) {
161 status_t status = update.state.surfaceControl->setSize(desiredWidth, desiredHeight);
164 status, update.state.surfaceWidth, update.state.surfaceHeight,
167 update.state.surfaceWidth = desiredWidth;
168 update.state.surfaceHeight = desiredHeight;
169 update.state.surfaceDrawn = false;
172 if (update.state.surfaceVisible) {
173 status = update.state.surfaceControl->hide();
177 update.state.surfaceVisible = false;
192 if ((update.state.dirty & DIRTY_BITMAP) && update.state.surfaceDrawn) {
193 update.state.surfaceDrawn = false;
197 if (update.state.surfaceControl != NULL && !update.state.surfaceDrawn
198 && update.state.wantSurfaceVisible()) {
199 sp<Surface> surface = update.state.surfaceControl->getSurface();
216 surfaceCanvas.drawBitmap(update.state.icon.bitmap, 0, 0, &paint);
218 if (surfaceInfo.w > uint32_t(update.state.icon.bitmap.width())) {
220 surfaceCanvas.drawRectCoords(update.state.icon.bitmap.width(), 0,
221 surfaceInfo.w, update.state.icon.bitmap.height(), paint);
223 if (surfaceInfo.h > uint32_t(update.state.icon.bitmap.height())) {
225 surfaceCanvas.drawRectCoords(0, update.state.icon.bitmap.height(),
233 update.state.surfaceDrawn = true;
245 bool wantSurfaceVisibleAndDrawn = update.state.wantSurfaceVisible()
246 && update.state.surfaceDrawn;
247 bool becomingVisible = wantSurfaceVisibleAndDrawn && !update.state.surfaceVisible;
248 bool becomingHidden = !wantSurfaceVisibleAndDrawn && update.state.surfaceVisible;
249 if (update.state.surfaceControl != NULL && (becomingVisible || becomingHidden
250 || (wantSurfaceVisibleAndDrawn && (update.state.dirty & (DIRTY_ALPHA
260 && (becomingVisible || (update.state.dirty & DIRTY_ALPHA))) {
261 status = update.state.surfaceControl->setAlpha(update.state.alpha);
268 && (becomingVisible || (update.state.dirty & (DIRTY_POSITION
270 status = update.state.surfaceControl->setPosition(
271 update.state.positionX - update.state.icon.hotSpotX,
272 update.state.positionY - update.state.icon.hotSpotY);
280 || (update.state.dirty & DIRTY_TRANSFORMATION_MATRIX))) {
281 status = update.state.surfaceControl->setMatrix(
282 update.state.transformationMatrix.dsdx,
283 update.state.transformationMatrix.dtdx,
284 update.state.transformationMatrix.dsdy,
285 update.state.transformationMatrix.dtdy);
291 int32_t surfaceLayer = mOverlayLayer + update.state.layer;
293 && (becomingVisible || (update.state.dirty & DIRTY_LAYER))) {
294 status = update.state.surfaceControl->setLayer(surfaceLayer);
301 status = update.state.surfaceControl->show(surfaceLayer);
305 update.state.surfaceVisible = true;
309 status = update.state.surfaceControl->hide();
313 update.state.surfaceVisible = false;
332 update.sprite->setSurfaceLocked(update.state.surfaceControl,
333 update.state.surfaceWidth, update.state.surfaceHeight,
334 update.state.surfaceDrawn, update.state.surfaceVisible);
393 if (mLocked.state.surfaceControl != NULL) {
394 mController->disposeSurfaceLocked(mLocked.state.surfaceControl);
395 mLocked.state.surfaceControl.clear();
404 icon.bitmap.copyTo(&mLocked.state.icon.bitmap, SkBitmap::kARGB_8888_Config);
406 if (!mLocked.state.icon.isValid()
407 || mLocked.state.icon.hotSpotX != icon.hotSpotX
408 || mLocked.state.icon.hotSpotY != icon.hotSpotY) {
409 mLocked.state.icon.hotSpotX = icon.hotSpotX;
410 mLocked.state.icon.hotSpotY = icon.hotSpotY;
415 } else if (mLocked.state.icon.isValid()) {
416 mLocked.state.icon.bitmap.reset();
428 if (mLocked.state.visible != visible) {
429 mLocked.state.visible = visible;
437 if (mLocked.state.positionX != x || mLocked.state.positionY != y) {
438 mLocked.state.positionX = x;
439 mLocked.state.positionY = y;
447 if (mLocked.state.layer != layer) {
448 mLocked.state.layer = layer;
456 if (mLocked.state.alpha != alpha) {
457 mLocked.state.alpha = alpha;
466 if (mLocked.state.transformationMatrix != matrix) {
467 mLocked.state.transformationMatrix = matrix;
473 bool wasDirty = mLocked.state.dirty;
474 mLocked.state.dirty |= dirty;