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

Commit 39645c83 authored by The Android Automerger's avatar The Android Automerger
Browse files

Merge branch 'master' into honeycomb-release

* master: (50 commits)
  Add LayoutTest http/tests/appcache/foreign-fallback.html to the DRT ignore list
  Add EXTRA_SKIP_UI to skip the confirmation page.
  Whenever LoadBinary fails, recompile. Fixing the multi-instance bug.
  Fix 3274309: Returns correctly sized thumbnails for MINI_KIND video thumbnails.
  Changing StackView layout to space items differently
  New SearchView assets and close-button behavior change.
  Fix for testAccessTransformationMethod cts test.
  Look again; the system bar is now diamonds.
  Fix text shadow rendering issue.
  Show keyboard when user starts a text selection.
  workaround [3201922] display not on: log full of gralloc errors
  Opted to recognize "h263" or "H263" boxes in an mp4 file
  Correct an error code to pass CTS.
  Initial support for a true streaming player for mpeg2 transport streams.
  Put Log.wtf's terrible failure in logcat -b main.
  Updating the light Date picker theme. Some UI fixes.
  Allow a JNI local ref to be passed directly into globalRef().
  b/2946595 Remove the touch events filter upon maps.google.com team's request.
  Turn thumbnails back on.
  Properly order the data written out to the transport stream by timestamp.
  ...
parents 349245e7 15e54831
Loading
Loading
Loading
Loading
+14 −18
Original line number Diff line number Diff line
@@ -804,7 +804,7 @@ Layer::ClientRef::Access::~Access()

Layer::BufferManager::BufferManager(TextureManager& tm)
    : mNumBuffers(NUM_BUFFERS), mTextureManager(tm),
      mActiveBuffer(-1), mFailover(false)
      mActiveBufferIndex(-1), mFailover(false)
{
}

@@ -819,10 +819,10 @@ status_t Layer::BufferManager::resize(size_t size,

    if (size < mNumBuffers) {
        // Move the active texture into slot 0
        BufferData activeBufferData = mBufferData[mActiveBuffer];
        mBufferData[mActiveBuffer] = mBufferData[0];
        BufferData activeBufferData = mBufferData[mActiveBufferIndex];
        mBufferData[mActiveBufferIndex] = mBufferData[0];
        mBufferData[0] = activeBufferData;
        mActiveBuffer = 0;
        mActiveBufferIndex = 0;

        // Free the buffers that are no longer needed.
        for (size_t i = size; i < mNumBuffers; i++) {
@@ -868,37 +868,33 @@ sp<GraphicBuffer> Layer::BufferManager::getBuffer(size_t index) const {
}

status_t Layer::BufferManager::setActiveBufferIndex(size_t index) {
    mActiveBuffer = index;
    BufferData const * const buffers = mBufferData;
    Mutex::Autolock _l(mLock);
    mActiveBuffer = buffers[index].buffer;
    mActiveBufferIndex = index;
    return NO_ERROR;
}

size_t Layer::BufferManager::getActiveBufferIndex() const {
    return mActiveBuffer;
    return mActiveBufferIndex;
}

Texture Layer::BufferManager::getActiveTexture() const {
    Texture res;
    if (mFailover || mActiveBuffer<0) {
    if (mFailover || mActiveBufferIndex<0) {
        res = mFailoverTexture;
    } else {
        static_cast<Image&>(res) = mBufferData[mActiveBuffer].texture;
        static_cast<Image&>(res) = mBufferData[mActiveBufferIndex].texture;
    }
    return res;
}

sp<GraphicBuffer> Layer::BufferManager::getActiveBuffer() const {
    sp<GraphicBuffer> result;
    const ssize_t activeBuffer = mActiveBuffer;
    if (activeBuffer >= 0) {
        BufferData const * const buffers = mBufferData;
        Mutex::Autolock _l(mLock);
        result = buffers[activeBuffer].buffer;
    }
    return result;
    return mActiveBuffer;
}

bool Layer::BufferManager::hasActiveBuffer() const {
    return mActiveBuffer >= 0;
    return mActiveBufferIndex >= 0;
}

sp<GraphicBuffer> Layer::BufferManager::detachBuffer(size_t index)
@@ -943,7 +939,7 @@ status_t Layer::BufferManager::initEglImage(EGLDisplay dpy,
        const sp<GraphicBuffer>& buffer)
{
    status_t err = NO_INIT;
    ssize_t index = mActiveBuffer;
    ssize_t index = mActiveBufferIndex;
    if (index >= 0) {
        if (!mFailover) {
            Image& texture(mBufferData[index].texture);
+2 −1
Original line number Diff line number Diff line
@@ -164,7 +164,8 @@ private:
        size_t              mNumBuffers;
        Texture             mFailoverTexture;
        TextureManager&     mTextureManager;
        ssize_t             mActiveBuffer;
        ssize_t             mActiveBufferIndex;
        sp<GraphicBuffer>   mActiveBuffer;
        bool                mFailover;
        static status_t destroyTexture(Image* tex, EGLDisplay dpy);

+4 −0
Original line number Diff line number Diff line
@@ -395,6 +395,7 @@ bool SurfaceFlinger::threadLoop()
        logger.log(GraphicLog::SF_REPAINT_DONE, index);
    } else {
        // pretend we did the post
        hw.compositionComplete();
        unlockClients();
        usleep(16667); // 60 fps period
    }
@@ -2184,6 +2185,9 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy,
    glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0);
    glDeleteRenderbuffersOES(1, &tname);
    glDeleteFramebuffersOES(1, &name);

    hw.compositionComplete();

    return result;
}