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

Commit 190c28f6 authored by The Android Automerger's avatar The Android Automerger
Browse files

Merge branch 'master' into honeycomb-release

parents 6f36f4d8 dda09805
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1163,7 +1163,10 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime,

        // If the pointer is not currently down, then ignore the event.
        if (! mTempTouchState.down) {
            LOGI("Dropping event because the pointer is not down.");
#if DEBUG_INPUT_DISPATCHER_POLICY
            LOGD("Dropping event because the pointer is not down or we previously "
                    "dropped the pointer down event.");
#endif
            injectionResult = INPUT_EVENT_INJECTION_FAILED;
            goto Failed;
        }
@@ -2775,7 +2778,7 @@ void InputDispatcher::dumpDispatchStateLocked(String8& dump) {
        dump.append(INDENT "ActiveConnections:\n");
        for (size_t i = 0; i < mActiveConnections.size(); i++) {
            const Connection* connection = mActiveConnections[i];
            dump.appendFormat(INDENT2 "%d: '%s', status=%s, outboundQueueLength=%u"
            dump.appendFormat(INDENT2 "%d: '%s', status=%s, outboundQueueLength=%u, "
                    "inputState.isNeutral=%s\n",
                    i, connection->getInputChannelName(), connection->getStatusLabel(),
                    connection->outboundQueue.count(),
+13 −0
Original line number Diff line number Diff line
@@ -132,6 +132,14 @@ void LayerBuffer::unlockPageFlip(const Transform& planeTransform,
    LayerBase::unlockPageFlip(planeTransform, outDirtyRegion);    
}

void LayerBuffer::validateVisibility(const Transform& globalTransform)
{
    sp<Source> source(getSource());
    if (source != 0)
        source->onvalidateVisibility(globalTransform);
    LayerBase::validateVisibility(globalTransform);
}

void LayerBuffer::drawForSreenShot() const
{
    const DisplayHardware& hw(graphicPlane(0).displayHardware());
@@ -641,6 +649,11 @@ void LayerBuffer::OverlaySource::onTransaction(uint32_t flags)
    }
}

void LayerBuffer::OverlaySource::onvalidateVisibility(const Transform&)
{
    mVisibilityChanged = true;
}

void LayerBuffer::OverlaySource::onVisibilityResolved(
        const Transform& planeTransform)
{
+3 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ class LayerBuffer : public LayerBaseClient
        virtual void onDraw(const Region& clip) const;
        virtual void onTransaction(uint32_t flags);
        virtual void onVisibilityResolved(const Transform& planeTransform);
        virtual void onvalidateVisibility(const Transform& globalTransform) { }
        virtual void postBuffer(ssize_t offset);
        virtual void unregisterBuffers();
        virtual void destroy() { }
@@ -67,6 +68,7 @@ public:
    virtual void drawForSreenShot() const;
    virtual uint32_t doTransaction(uint32_t flags);
    virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion);
    virtual void validateVisibility(const Transform& globalTransform);

    status_t registerBuffers(const ISurface::BufferHeap& buffers);
    void postBuffer(ssize_t offset);
@@ -153,6 +155,7 @@ private:
        virtual void onDraw(const Region& clip) const;
        virtual void onTransaction(uint32_t flags);
        virtual void onVisibilityResolved(const Transform& planeTransform);
        virtual void onvalidateVisibility(const Transform& globalTransform);
        virtual void destroy();
    private:

+18 −42
Original line number Diff line number Diff line
@@ -159,56 +159,32 @@ status_t Transform::set(uint32_t flags, float w, float h)
        return BAD_VALUE;
    }

    mType = flags << 8;
    float sx = (flags & FLIP_H) ? -1 : 1;
    float sy = (flags & FLIP_V) ? -1 : 1;
    float a=0, b=0, c=0, d=0, x=0, y=0;
    int xmask = 0;

    // computation of x,y
    // x y
    // 0 0  0
    // w 0  ROT90
    // w h  FLIPH|FLIPV
    // 0 h  FLIPH|FLIPV|ROT90

    if (flags & ROT_90) {
        mType |= ROTATE;
        b = -sy;
        c = sx;
        xmask = 1;
    } else {
        a = sx;
        d = sy;
    }

    Transform H, V, R;
    if (flags & FLIP_H) {
        mType ^= SCALE;
        xmask ^= 1;
        H.mType = (FLIP_H << 8) | SCALE;
        H.mType |= isZero(w) ? IDENTITY : TRANSLATE;
        mat33& M(H.mMatrix);
        M[0][0] = -1;
        M[2][0] = w;
    }

    if (flags & FLIP_V) {
        mType ^= SCALE;
        y = h;
        V.mType = (FLIP_V << 8) | SCALE;
        V.mType |= isZero(h) ? IDENTITY : TRANSLATE;
        mat33& M(V.mMatrix);
        M[1][1] = -1;
        M[2][1] = h;
    }

    if ((flags & ROT_180) == ROT_180) {
        mType |= ROTATE;
    }

    if (xmask) {
        x = w;
    }

    if (!isZero(x) || !isZero(y)) {
        mType |= TRANSLATE;
    if (flags & ROT_90) {
        R.mType = (ROT_90 << 8) | ROTATE;
        R.mType |= isZero(w) ? IDENTITY : TRANSLATE;
        mat33& M(R.mMatrix);
        M[0][0] = 0;    M[1][0] =-1;    M[2][0] = w;
        M[0][1] = 1;    M[1][1] = 0;
    }

    mat33& M(mMatrix);
    M[0][0] = a;    M[1][0] = b;    M[2][0] = x;
    M[0][1] = c;    M[1][1] = d;    M[2][1] = y;
    M[0][2] = 0;    M[1][2] = 0;    M[2][2] = 1;

    *this = ((H*V)*R);
    return NO_ERROR;
}

+5 −4
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@
#include <ui/Point.h>
#include <ui/Rect.h>

#include <hardware/hardware.h>

namespace android {

class Region;
@@ -37,12 +39,11 @@ public:
           explicit Transform(uint32_t orientation);
                    ~Transform();

            // FIXME: must match OVERLAY_TRANSFORM_*, pull from hardware.h
            enum orientation_flags {
                ROT_0   = 0x00000000,
                FLIP_H  = 0x00000001,
                FLIP_V  = 0x00000002,
                ROT_90  = 0x00000004,
                FLIP_H  = HAL_TRANSFORM_FLIP_H,
                FLIP_V  = HAL_TRANSFORM_FLIP_V,
                ROT_90  = HAL_TRANSFORM_ROT_90,
                ROT_180 = FLIP_H|FLIP_V,
                ROT_270 = ROT_180|ROT_90,
                ROT_INVALID = 0x80
Loading