diff options
Diffstat (limited to 'services/surfaceflinger/Layer.h')
-rw-r--r-- | services/surfaceflinger/Layer.h | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index c1e5e9f..196ef3e 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -57,6 +57,7 @@ class Colorizer; class DisplayDevice; class GraphicBuffer; class SurfaceFlinger; +class LayerBlur; // --------------------------------------------------------------------------- @@ -70,7 +71,12 @@ class SurfaceFlinger; class Layer : public SurfaceFlingerConsumer::ContentsChangedListener { static int32_t sSequence; + friend class LayerBlur; + public: +#ifdef QTI_BSP + friend class ExLayer; +#endif mutable bool contentDirty; // regions below are in window-manager space Region visibleRegion; @@ -105,6 +111,7 @@ public: Geometry requested; uint32_t z; uint32_t layerStack; + uint8_t blur; uint8_t alpha; uint8_t flags; uint8_t reserved[2]; @@ -130,6 +137,10 @@ public: // modify current state bool setPosition(float x, float y); bool setLayer(uint32_t z); + bool setBlur(uint8_t blur); + virtual bool setBlurMaskLayer(sp<Layer>& /*maskLayer*/) { return false; } + virtual bool setBlurMaskSampling(int32_t /*sampling*/) { return false; } + virtual bool setBlurMaskAlphaThreshold(float /*alpha*/) { return false; } bool setSize(uint32_t w, uint32_t h); bool setAlpha(uint8_t alpha); bool setMatrix(const layer_state_t::matrix22_t& matrix); @@ -192,19 +203,24 @@ public: */ virtual bool isFixedSize() const; + /* + * isBlurLayer - true if this is a LayerBlur instance + */ + virtual bool isBlurLayer() const { return false; } + protected: /* * onDraw - draws the surface. */ virtual void onDraw(const sp<const DisplayDevice>& hw, const Region& clip, - bool useIdentityTransform) const; + bool useIdentityTransform); public: // ----------------------------------------------------------------------- void setGeometry(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer); - void setPerFrameData(const sp<const DisplayDevice>& hw, + virtual void setPerFrameData(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer); void setAcquireFence(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer); @@ -234,9 +250,9 @@ public: * draw - performs some global clipping optimizations * and calls onDraw(). */ - void draw(const sp<const DisplayDevice>& hw, const Region& clip) const; - void draw(const sp<const DisplayDevice>& hw, bool useIdentityTransform) const; - void draw(const sp<const DisplayDevice>& hw) const; + void draw(const sp<const DisplayDevice>& hw, const Region& clip); + void draw(const sp<const DisplayDevice>& hw, bool useIdentityTransform); + void draw(const sp<const DisplayDevice>& hw); /* * doTransaction - process the transaction. This is a good place to figure @@ -283,7 +299,22 @@ public: // Updates the transform hint in our SurfaceFlingerConsumer to match // the current orientation of the display device. - void updateTransformHint(const sp<const DisplayDevice>& hw) const; + void updateTransformHint(const sp<const DisplayDevice>& hw) ; + + /* ------------------------------------------------------------------------ + * Extensions + */ + virtual bool isExtOnly() const { return false; } + virtual bool isIntOnly() const { return false; } + virtual bool isSecureDisplay() const { return false; } + virtual bool isYuvLayer() const { return false; } + virtual void setPosition(const sp<const DisplayDevice>& /*hw*/, + HWComposer::HWCLayerInterface& /*layer*/, + const State& /*state*/) { } + virtual void setAcquiredFenceIfBlit(int& /*fenceFd */, + HWComposer::HWCLayerInterface& /*layer */) { } + virtual bool canAllowGPUForProtected() const { return false; } + /* * returns the rectangle that crops the content of the layer and scales it @@ -336,6 +367,7 @@ protected: LayerCleaner(const sp<SurfaceFlinger>& flinger, const sp<Layer>& layer); }; + Rect reduce(const Rect& win, const Region& exclude) const; private: // Interface implementation for SurfaceFlingerConsumer::ContentsChangedListener @@ -419,6 +451,7 @@ private: Vector<BufferItem> mQueueItems; uint64_t mLastFrameNumberReceived; bool mUpdateTexImageFailed; // This is only modified from the main thread + uint32_t mTransformHint; }; // --------------------------------------------------------------------------- |