Skip to content
Snippets Groups Projects
Commit 9252ccea authored by Diego Wilson's avatar Diego Wilson
Browse files

Remove alpha from hwc_layer_t

The addition of alpha to hwc_layer_t made it binary incompatible
with the upstream AOSP

Change-Id: Ic85f83c4dda986cb5797896c879a33f8422d0261
parent 225a9a29
No related branches found
No related tags found
No related merge requests found
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 162c241..94630c2 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -200,8 +200,6 @@ void Layer::setGeometry(hwc_layer_t* hwcl)
}
}
- hwcl->alpha = s.alpha;
-
/*
* Transformations are applied in this order:
* 1) buffer orientation/flip/mirror
diff --git a/include/hardware/hwcomposer.h b/include/hardware/hwcomposer.h
index 1b77733..d53269f 100644
--- a/include/hardware/hwcomposer.h
+++ b/include/hardware/hwcomposer.h
@@ -169,9 +169,6 @@ typedef struct hwc_layer {
/* blending to apply during composition */
int32_t blending;
- /* alpha value of the layer */
- int32_t alpha;
-
/* area of the source to consider, the origin is the top-left corner of
* the buffer */
hwc_rect_t sourceCrop;
diff --git a/libhwcomposer/a-family/hwcomposer.cpp b/libhwcomposer/a-family/hwcomposer.cpp
index 378870f..6ab47f0 100644
--- a/libhwcomposer/a-family/hwcomposer.cpp
+++ b/libhwcomposer/a-family/hwcomposer.cpp
@@ -1624,8 +1624,7 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer,
hwc_region_t tmp_hwc_reg = {1,(hwc_rect_t const*)&tmp_hwc_rect};
region_iterator tmp_it(tmp_hwc_reg);
copybit->set_parameter(copybit,COPYBIT_TRANSFORM,0);
- copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA,
- (layer->blending == HWC_BLENDING_NONE) ? -1 : layer->alpha);
+ copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 255);
err = copybit->stretch(copybit,&tmp_dst, &src, &tmp_rect, &srcRect, &tmp_it);
if(err < 0){
LOGE("%s:%d::tmp copybit stretch failed",__FUNCTION__,__LINE__);
@@ -1659,8 +1658,7 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer,
copybit->set_parameter(copybit, COPYBIT_FRAMEBUFFER_WIDTH, renderBuffer->width);
copybit->set_parameter(copybit, COPYBIT_FRAMEBUFFER_HEIGHT, renderBuffer->height);
copybit->set_parameter(copybit, COPYBIT_TRANSFORM, layerTransform);
- copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA,
- (layer->blending == HWC_BLENDING_NONE) ? -1 : layer->alpha);
+ copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 255);
copybit->set_parameter(copybit, COPYBIT_PREMULTIPLIED_ALPHA,
(layer->blending == HWC_BLENDING_PREMULT)? COPYBIT_ENABLE : COPYBIT_DISABLE);
copybit->set_parameter(copybit, COPYBIT_DITHER,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment