Loading libs/ui/InputDispatcher.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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(), Loading services/surfaceflinger/LayerBuffer.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -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()); Loading Loading @@ -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) { Loading services/surfaceflinger/LayerBuffer.h +3 −0 Original line number Diff line number Diff line Loading @@ -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() { } Loading @@ -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); Loading Loading @@ -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: Loading services/surfaceflinger/Transform.cpp +18 −42 Original line number Diff line number Diff line Loading @@ -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; } Loading services/surfaceflinger/Transform.h +5 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ #include <ui/Point.h> #include <ui/Rect.h> #include <hardware/hardware.h> namespace android { class Region; Loading @@ -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 Loading
libs/ui/InputDispatcher.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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(), Loading
services/surfaceflinger/LayerBuffer.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -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()); Loading Loading @@ -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) { Loading
services/surfaceflinger/LayerBuffer.h +3 −0 Original line number Diff line number Diff line Loading @@ -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() { } Loading @@ -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); Loading Loading @@ -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: Loading
services/surfaceflinger/Transform.cpp +18 −42 Original line number Diff line number Diff line Loading @@ -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; } Loading
services/surfaceflinger/Transform.h +5 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ #include <ui/Point.h> #include <ui/Rect.h> #include <hardware/hardware.h> namespace android { class Region; Loading @@ -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