diff options
author | 2017-06-27 12:40:18 -0700 | |
---|---|---|
committer | 2017-09-21 18:10:21 -0700 | |
commit | 13fdc49516d17f41e64e62e73c313b0928bf13cc (patch) | |
tree | 556fefa10d7612c1577cacf0d954715829b791a2 /libs/gui/SurfaceControl.cpp | |
parent | dda5d5d7914297adb42e251e8aadaece4dc3e65a (diff) |
Added native functionality to create a color layer.
Added a new layer that can draw a specified color and specified
alpha. This will replace creating a dim layer and allow any colors,
not just black, to be set for this layer.
Test: Added tests to Transaction_test.cpp to test with a color
and a color layer with alpha.
Change-Id: I00a38d1bbc01093026f088c3347454281bdc2b8c
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
-rw-r--r-- | libs/gui/SurfaceControl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp index d801d12738..9e1d7b6647 100644 --- a/libs/gui/SurfaceControl.cpp +++ b/libs/gui/SurfaceControl.cpp @@ -155,6 +155,11 @@ status_t SurfaceControl::setAlpha(float alpha) { if (err < 0) return err; return mClient->setAlpha(mHandle, alpha); } +status_t SurfaceControl::setColor(const half3& color) { + status_t err = validate(); + if (err < 0) return err; + return mClient->setColor(mHandle, color); +} status_t SurfaceControl::setMatrix(float dsdx, float dtdx, float dtdy, float dsdy) { status_t err = validate(); if (err < 0) return err; |