summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2014-12-05 18:28:32 -0800
committerSteve Kondik <steve@cyngn.com>2015-11-08 01:07:13 -0800
commit987034b5633d0eb7fca806acfe00ddbe3305b159 (patch)
tree9d186252541a857729a9f3920bd8369d4a056e0d /include
parentb53d92c3eb9319dbf725b3e59b3c52acfa6d77f0 (diff)
downloadframeworks_native-987034b5633d0eb7fca806acfe00ddbe3305b159.zip
frameworks_native-987034b5633d0eb7fca806acfe00ddbe3305b159.tar.gz
frameworks_native-987034b5633d0eb7fca806acfe00ddbe3305b159.tar.bz2
SurfaceFlinger: Native changes to add blur effect
Native changes to add blur-behind and blur mask effect Change-Id: I54faf82d750e8299de6d261f6a893ab26d08df84 SurfaceFlinger: Adding template for LayerBlur files Change-Id: I444009113b7bdd6c5284863fd1f56358e67d9fe6 SurfaceFlinger: Featurize libuiblur module for OSS build Change-Id: Ifdc176e699434125d17b111c044b8ba954cf717c
Diffstat (limited to 'include')
-rw-r--r--include/gui/ISurfaceComposerClient.h1
-rw-r--r--include/gui/SurfaceComposerClient.h5
-rw-r--r--include/gui/SurfaceControl.h5
-rw-r--r--include/private/gui/LayerState.h12
4 files changed, 21 insertions, 2 deletions
diff --git a/include/gui/ISurfaceComposerClient.h b/include/gui/ISurfaceComposerClient.h
index bb79bd0..d3e8b8b 100644
--- a/include/gui/ISurfaceComposerClient.h
+++ b/include/gui/ISurfaceComposerClient.h
@@ -50,6 +50,7 @@ public:
eCursorWindow = 0x00002000,
eFXSurfaceNormal = 0x00000000,
+ eFXSurfaceBlur = 0x00010000,
eFXSurfaceDim = 0x00020000,
eFXSurfaceMask = 0x000F0000,
};
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index 37d953e..9ec3f23 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -163,6 +163,11 @@ public:
const Rect& layerStackRect,
const Rect& displayRect);
+ status_t setBlur(const sp<IBinder>& id, float blur);
+ status_t setBlurMaskSurface(const sp<IBinder>& id, const sp<IBinder>& maskSurfaceId);
+ status_t setBlurMaskSampling(const sp<IBinder>& id, uint32_t blurMaskSampling);
+ status_t setBlurMaskAlphaThreshold(const sp<IBinder>& id, float alpha);
+
private:
virtual void onFirstRef();
Composer& getComposer();
diff --git a/include/gui/SurfaceControl.h b/include/gui/SurfaceControl.h
index 9f62f7c..5fa45d1 100644
--- a/include/gui/SurfaceControl.h
+++ b/include/gui/SurfaceControl.h
@@ -77,6 +77,11 @@ public:
status_t clearLayerFrameStats() const;
status_t getLayerFrameStats(FrameStats* outStats) const;
+ status_t setBlur(float blur = 0);
+ status_t setBlurMaskSurface(const sp<SurfaceControl>& maskSurface);
+ status_t setBlurMaskSampling(uint32_t blurMaskSampling);
+ status_t setBlurMaskAlphaThreshold(float alpha);
+
private:
// can't be copied
SurfaceControl& operator = (SurfaceControl& rhs);
diff --git a/include/private/gui/LayerState.h b/include/private/gui/LayerState.h
index cbe8733..9ff8409 100644
--- a/include/private/gui/LayerState.h
+++ b/include/private/gui/LayerState.h
@@ -52,12 +52,16 @@ struct layer_state_t {
eFlagsChanged = 0x00000040,
eLayerStackChanged = 0x00000080,
eCropChanged = 0x00000100,
+ eBlurChanged = 0x00400000,
+ eBlurMaskSurfaceChanged = 0x00800000,
+ eBlurMaskSamplingChanged = 0x01000000,
+ eBlurMaskAlphaThresholdChanged = 0x02000000,
};
layer_state_t()
: what(0),
- x(0), y(0), z(0), w(0), h(0), layerStack(0),
- alpha(0), flags(0), mask(0),
+ x(0), y(0), z(0), w(0), h(0), layerStack(0), blur(0),
+ blurMaskSampling(0), blurMaskAlphaThreshold(0), alpha(0), flags(0), mask(0),
reserved(0)
{
matrix.dsdx = matrix.dtdy = 1.0f;
@@ -82,6 +86,10 @@ struct layer_state_t {
uint32_t w;
uint32_t h;
uint32_t layerStack;
+ float blur;
+ sp<IBinder> blurMaskSurface;
+ uint32_t blurMaskSampling;
+ float blurMaskAlphaThreshold;
float alpha;
uint8_t flags;
uint8_t mask;