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

Commit ac4b7441 authored by The Android Automerger's avatar The Android Automerger
Browse files

Merge branch 'master' into honeycomb-release

parents 379d3166 8adf9991
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@ public:
    ~SharedBufferBase();
    status_t getStatus() const;
    int32_t getIdentity() const;
    size_t getFrontBuffer() const;
    String8 dump(char const* prefix) const;

protected:
@@ -226,6 +225,11 @@ private:
        inline ssize_t operator()();
    };

    struct DequeueUpdate : public UpdateBase {
        inline DequeueUpdate(SharedBufferBase* sbb);
        inline ssize_t operator()();
    };

    struct UndoDequeueUpdate : public UpdateBase {
        inline UndoDequeueUpdate(SharedBufferBase* sbb);
        inline ssize_t operator()();
+12 −12
Original line number Diff line number Diff line
@@ -191,12 +191,6 @@ int32_t SharedBufferBase::getIdentity() const
    return stack.identity;
}

size_t SharedBufferBase::getFrontBuffer() const
{
    SharedBufferStack& stack( *mSharedStack );
    return size_t( stack.head );
}

String8 SharedBufferBase::dump(char const* prefix) const
{
    const size_t SIZE = 1024;
@@ -281,6 +275,16 @@ ssize_t SharedBufferClient::QueueUpdate::operator()() {
    return NO_ERROR;
}

SharedBufferClient::DequeueUpdate::DequeueUpdate(SharedBufferBase* sbb)
    : UpdateBase(sbb) {
}
ssize_t SharedBufferClient::DequeueUpdate::operator()() {
    if (android_atomic_dec(&stack.available) == 0) {
        LOGW("dequeue probably called from multiple threads!");
    }
    return NO_ERROR;
}

SharedBufferClient::UndoDequeueUpdate::UndoDequeueUpdate(SharedBufferBase* sbb)
    : UpdateBase(sbb) {    
}
@@ -383,12 +387,8 @@ ssize_t SharedBufferClient::dequeue()
    if (err != NO_ERROR)
        return ssize_t(err);

    // NOTE: 'stack.available' is part of the conditions, however
    // decrementing it, never changes any conditions, so we don't need
    // to do this as part of an update.
    if (android_atomic_dec(&stack.available) == 0) {
        LOGW("dequeue probably called from multiple threads!");
    }
    DequeueUpdate update(this);
    updateCondition( update );

    undoDequeueTail = tail;
    int dequeued = stack.index[tail];
+2 −2
Original line number Diff line number Diff line
@@ -508,8 +508,8 @@ bool ZipFileRO::getEntryInfo(ZipEntryRO entry, int* pMethod, size_t* pUncompLen,
        }

        if (get4LE(lfhBuf) != kLFHSignature) {
            LOGW("didn't find signature at start of lfh, offset=%ld\n",
                localHdrOffset);
            LOGW("didn't find signature at start of lfh, offset=%ld (got 0x%08lx, expected 0x%08x)\n",
                localHdrOffset, get4LE(lfhBuf), kLFHSignature);
            return false;
        }

+0 −8
Original line number Diff line number Diff line
@@ -229,14 +229,6 @@ struct android_native_buffer_t;
#define EGL_NATIVE_BUFFER_ANDROID       0x3140  /* eglCreateImageKHR target */
#endif

#ifndef EGL_ANDROID_get_render_buffer
#define EGL_ANDROID_get_render_buffer 1
#ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLClientBuffer EGLAPIENTRY eglGetRenderBufferANDROID(EGLDisplay dpy, EGLSurface draw);
#endif
typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLGETRENDERBUFFERANDROIDPROC) (EGLDisplay dpy, EGLSurface draw);
#endif

#ifndef EGL_ANDROID_swap_rectangle
#define EGL_ANDROID_swap_rectangle 1
#ifdef EGL_EGLEXT_PROTOTYPES
+0 −28
Original line number Diff line number Diff line
@@ -158,7 +158,6 @@ struct egl_surface_t
    virtual     EGLint      getSwapBehavior() const;
    virtual     EGLBoolean  swapBuffers();
    virtual     EGLBoolean  setSwapRectangle(EGLint l, EGLint t, EGLint w, EGLint h);
    virtual     EGLClientBuffer getRenderBuffer() const;
protected:
    GGLSurface              depth;
};
@@ -202,9 +201,6 @@ EGLBoolean egl_surface_t::setSwapRectangle(
{
    return EGL_FALSE;
}
EGLClientBuffer egl_surface_t::getRenderBuffer() const {
    return 0;
}

// ----------------------------------------------------------------------------

@@ -230,7 +226,6 @@ struct egl_window_surface_v2_t : public egl_surface_t
    virtual     EGLint      getRefreshRate() const;
    virtual     EGLint      getSwapBehavior() const;
    virtual     EGLBoolean  setSwapRectangle(EGLint l, EGLint t, EGLint w, EGLint h);
    virtual     EGLClientBuffer  getRenderBuffer() const;
    
private:
    status_t lock(android_native_buffer_t* buf, int usage, void** vaddr);
@@ -626,11 +621,6 @@ EGLBoolean egl_window_surface_v2_t::setSwapRectangle(
    return EGL_TRUE;
}

EGLClientBuffer egl_window_surface_v2_t::getRenderBuffer() const
{
    return buffer;
}

EGLBoolean egl_window_surface_v2_t::bindDrawSurface(ogles_context_t* gl)
{
    GGLSurface buffer;
@@ -857,7 +847,6 @@ static char const * const gExtensionsString =
        // "KHR_image_pixmap "
        "EGL_ANDROID_image_native_buffer "
        "EGL_ANDROID_swap_rectangle "
        "EGL_ANDROID_get_render_buffer "
        ;

// ----------------------------------------------------------------------------
@@ -910,8 +899,6 @@ static const extention_map_t gExtentionMap[] = {
            (__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR }, 
    { "eglSetSwapRectangleANDROID", 
            (__eglMustCastToProperFunctionPointerType)&eglSetSwapRectangleANDROID }, 
    { "eglGetRenderBufferANDROID", 
            (__eglMustCastToProperFunctionPointerType)&eglGetRenderBufferANDROID }, 
};

/*
@@ -2129,18 +2116,3 @@ EGLBoolean eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,

    return EGL_TRUE;
}

EGLClientBuffer eglGetRenderBufferANDROID(EGLDisplay dpy, EGLSurface draw)
{
    if (egl_display_t::is_valid(dpy) == EGL_FALSE)
        return setError(EGL_BAD_DISPLAY, (EGLClientBuffer)0);

    egl_surface_t* d = static_cast<egl_surface_t*>(draw);
    if (!d->isValid())
        return setError(EGL_BAD_SURFACE, (EGLClientBuffer)0);
    if (d->dpy != dpy)
        return setError(EGL_BAD_DISPLAY, (EGLClientBuffer)0);

    // post the surface
    return d->getRenderBuffer();
}
Loading