summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index be7b1d2f6a..c5a4389ae8 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -158,6 +158,8 @@ public:
const Region& transparentRegion);
status_t setAlpha(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id,
float alpha);
+ status_t setColor(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id,
+ const half3& color);
status_t setMatrix(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id,
float dsdx, float dtdx, float dtdy, float dsdy);
status_t setOrientation(int orientation);
@@ -402,6 +404,17 @@ status_t Composer::setAlpha(const sp<SurfaceComposerClient>& client,
return NO_ERROR;
}
+status_t Composer::setColor(const sp<SurfaceComposerClient>& client,
+ const sp<IBinder>& id, const half3& color) {
+ Mutex::Autolock _l(mLock);
+ layer_state_t* s = getLayerStateLocked(client, id);
+ if (!s)
+ return BAD_INDEX;
+ s->what |= layer_state_t::eColorChanged;
+ s->color = color;
+ return NO_ERROR;
+}
+
status_t Composer::setLayerStack(const sp<SurfaceComposerClient>& client,
const sp<IBinder>& id, uint32_t layerStack) {
Mutex::Autolock _l(mLock);
@@ -822,6 +835,10 @@ status_t SurfaceComposerClient::setAlpha(const sp<IBinder>& id, float alpha) {
return getComposer().setAlpha(this, id, alpha);
}
+status_t SurfaceComposerClient::setColor(const sp<IBinder>& id, const half3& color) {
+ return getComposer().setColor(this, id, color);
+}
+
status_t SurfaceComposerClient::setLayerStack(const sp<IBinder>& id, uint32_t layerStack) {
return getComposer().setLayerStack(this, id, layerStack);
}