Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8d23a23 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 25423 into eclair

* changes:
  fix [2119400] sholes: artifacting when switching orientation
parents 0c4c1655 caa600c4
Loading
Loading
Loading
Loading
+13 −13
Original line number Original line Diff line number Diff line
@@ -303,7 +303,6 @@ uint32_t Layer::doTransaction(uint32_t flags)


    // Index of the back buffer
    // Index of the back buffer
    const bool backbufferChanged = (front.w != temp.w) || (front.h != temp.h);
    const bool backbufferChanged = (front.w != temp.w) || (front.h != temp.h);

    if (backbufferChanged) {
    if (backbufferChanged) {
        // the size changed, we need to ask our client to request a new buffer
        // the size changed, we need to ask our client to request a new buffer
        LOGD_IF(DEBUG_RESIZE,
        LOGD_IF(DEBUG_RESIZE,
@@ -318,17 +317,6 @@ uint32_t Layer::doTransaction(uint32_t flags)
        // buffer, it'll get the new size.
        // buffer, it'll get the new size.
        setDrawingSize(temp.w, temp.h);
        setDrawingSize(temp.w, temp.h);


        // all buffers need reallocation
        lcblk->reallocate();

        // recompute the visible region
        // FIXME: ideally we would do that only when we have received
        // a buffer of the right size
        flags |= Layer::eVisibleRegion;
        this->contentDirty = true;
        
#if 0 
        // FIXME: handle freeze lock
        // we're being resized and there is a freeze display request,
        // we're being resized and there is a freeze display request,
        // acquire a freeze lock, so that the screen stays put
        // acquire a freeze lock, so that the screen stays put
        // until we've redrawn at the new size; this is to avoid
        // until we've redrawn at the new size; this is to avoid
@@ -340,7 +328,12 @@ uint32_t Layer::doTransaction(uint32_t flags)
                mFreezeLock = mFlinger->getFreezeLock();
                mFreezeLock = mFlinger->getFreezeLock();
            }
            }
        }
        }
#endif

        // recompute the visible region
        flags |= Layer::eVisibleRegion;
        this->contentDirty = true;
        // all buffers need reallocation
        lcblk->reallocate();
    }
    }


    if (temp.sequence != front.sequence) {
    if (temp.sequence != front.sequence) {
@@ -382,6 +375,13 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
    const Region dirty(lcblk->getDirtyRegion(buf));
    const Region dirty(lcblk->getDirtyRegion(buf));
    mPostedDirtyRegion = dirty.intersect( newFrontBuffer->getBounds() );
    mPostedDirtyRegion = dirty.intersect( newFrontBuffer->getBounds() );



    const Layer::State& front(drawingState());
    if (newFrontBuffer->getWidth() == front.w &&
        newFrontBuffer->getHeight() ==front.h) {
        mFreezeLock.clear();
    }

    // FIXME: signal an event if we have more buffers waiting
    // FIXME: signal an event if we have more buffers waiting
    // mFlinger->signalEvent();
    // mFlinger->signalEvent();