Skip to content
Snippets Groups Projects
Commit 5ed948a0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Remove alpha from hwc_layer_t on ICS chocolate"

parents f8e43ba1 60faaafa
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 dd1f3e4..61109c7 100755
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -194,8 +194,6 @@ void Layer::setGeometry(hwc_layer_t* hwcl)
hwcl->flags = HWC_SKIP_LAYER;
}
- 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 4ccd512..e65f5b5 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/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp
index 9792a8b..11397d4 100755
--- a/libhwcomposer/hwcomposer.cpp
+++ b/libhwcomposer/hwcomposer.cpp
@@ -1395,8 +1395,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__);
@@ -1417,8 +1416,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, layer->transform);
- 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