summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-02-12 22:38:03 -0800
committerSteve Kondik <shade@chemlab.org>2013-02-12 22:38:03 -0800
commitaf115871b4224c7196d7286378bb8a60606adc29 (patch)
tree1fad71c29ce9f221acc0058166c7a1593dec9e01
parent09c0110bf6b432e92d348d39565d05f08b4b79c7 (diff)
parent48697f6dc249d1238243677de77d3a0eb6a17b3f (diff)
downloadhardware_libhardware-af115871b4224c7196d7286378bb8a60606adc29.zip
hardware_libhardware-af115871b4224c7196d7286378bb8a60606adc29.tar.gz
hardware_libhardware-af115871b4224c7196d7286378bb8a60606adc29.tar.bz2
Merge tag 'android-4.2.2_r1' of https://android.googlesource.com/platform/hardware/libhardware into 1.1
Android 4.2.2 release 1
-rw-r--r--include/hardware/hwcomposer.h58
1 files changed, 45 insertions, 13 deletions
diff --git a/include/hardware/hwcomposer.h b/include/hardware/hwcomposer.h
index ac3aa42..403e4a5 100644
--- a/include/hardware/hwcomposer.h
+++ b/include/hardware/hwcomposer.h
@@ -80,21 +80,25 @@ typedef struct hwc_color {
typedef struct hwc_layer_1 {
/*
- * Initially set to HWC_FRAMEBUFFER, HWC_BACKGROUND, or
- * HWC_FRAMEBUFFER_TARGET.
+ * compositionType is used to specify this layer's type and is set by either
+ * the hardware composer implementation, or by the caller (see below).
*
- * HWC_FRAMEBUFFER
- * Indicates the layer will be drawn into the framebuffer
- * using OpenGL ES. The HWC can toggle this value to HWC_OVERLAY to
- * indicate it will handle the layer.
+ * This field is always reset to HWC_BACKGROUND or HWC_FRAMEBUFFER
+ * before (*prepare)() is called when the HWC_GEOMETRY_CHANGED flag is
+ * also set, otherwise, this field is preserved between (*prepare)()
+ * calls.
*
* HWC_BACKGROUND
- * Indicates this is a special "background" layer. The only valid field
- * is backgroundColor. The HWC can toggle this value to HWC_FRAMEBUFFER
- * to indicate it CANNOT handle the background color.
+ * Always set by the caller before calling (*prepare)(), this value
+ * indicates this is a special "background" layer. The only valid field
+ * is backgroundColor.
+ * The HWC can toggle this value to HWC_FRAMEBUFFER to indicate it CANNOT
+ * handle the background color.
+ *
*
* HWC_FRAMEBUFFER_TARGET
- * Indicates this layer is the framebuffer surface used as the target of
+ * Always set by the caller before calling (*prepare)(), this value
+ * indicates this layer is the framebuffer surface used as the target of
* OpenGL ES composition. If the HWC sets all other layers to HWC_OVERLAY
* or HWC_BACKGROUND, then no OpenGL ES composition will be done, and
* this layer should be ignored during set().
@@ -103,13 +107,38 @@ typedef struct hwc_layer_1 {
* HWC version is HWC_DEVICE_API_VERSION_1_1 or higher. In older versions,
* the OpenGL ES target surface is communicated by the (dpy, sur) fields
* in hwc_compositor_device_1_t.
+ *
+ * This value cannot be set by the HWC implementation.
+ *
+ *
+ * HWC_FRAMEBUFFER
+ * Set by the caller before calling (*prepare)() ONLY when the
+ * HWC_GEOMETRY_CHANGED flag is also set.
+ *
+ * Set by the HWC implementation during (*prepare)(), this indicates
+ * that the layer will be drawn into the framebuffer using OpenGL ES.
+ * The HWC can toggle this value to HWC_OVERLAY to indicate it will
+ * handle the layer.
+ *
+ *
+ * HWC_OVERLAY
+ * Set by the HWC implementation during (*prepare)(), this indicates
+ * that the layer will be handled by the HWC (ie: it must not be
+ * composited with OpenGL ES).
+ *
*/
int32_t compositionType;
- /* see hwc_layer_t::hints above */
+ /*
+ * hints is bit mask set by the HWC implementation during (*prepare)().
+ * It is preserved between (*prepare)() calls, unless the
+ * HWC_GEOMETRY_CHANGED flag is set, in which case it is reset to 0.
+ *
+ * see hwc_layer_t::hints
+ */
uint32_t hints;
- /* see hwc_layer_t::flags above */
+ /* see hwc_layer_t::flags */
uint32_t flags;
union {
@@ -361,11 +390,14 @@ typedef struct hwc_composer_device_1 {
* either HWC_FRAMEBUFFER or HWC_OVERLAY. In the former case, the
* composition for the layer is handled by SurfaceFlinger with OpenGL ES,
* in the later case, the HWC will have to handle the layer's composition.
+ * compositionType and hints are preserved between (*prepare)() calles
+ * unless the HWC_GEOMETRY_CHANGED flag is set.
*
* (*prepare)() is called with HWC_GEOMETRY_CHANGED to indicate that the
* list's geometry has changed, that is, when more than just the buffer's
* handles have been updated. Typically this happens (but is not limited to)
- * when a window is added, removed, resized or moved.
+ * when a window is added, removed, resized or moved. In this case
+ * compositionType and hints are reset to their default value.
*
* For HWC 1.0, numDisplays will always be one, and displays[0] will be
* non-NULL.