Home | History | Annotate | Download | only in hwc

Lines Matching refs:layer

103 static void rgz_get_src_rect(hwc_layer_1_t* layer, blit_rect_t *subregion_rect, blit_rect_t *res_rect);
107 static int rgz_hwc_scaled(hwc_layer_1_t *layer);
111 /* Represents a screen sized background layer */
160 * number of layers in the hregion until the first layer which doesn't require
172 hwc_layer_1_t *layer = hregion->rgz_layers[l]->hwc_layer;
173 IMG_native_handle_t *h = (IMG_native_handle_t *)layer->handle;
174 if ((layer->blending != HWC_BLENDING_PREMULT) || is_OPAQUE(h->iFormat))
265 OUTE("Layer %d", i);
278 /* Begin from index 1 to remove the background layer from the output */
282 OUTE("bvdirect_paint: error in layer %d: %d", i, rv);
308 static void rgz_get_displayframe_rect(hwc_layer_1_t *layer, blit_rect_t *res_rect)
310 res_rect->left = layer->displayFrame.left;
311 res_rect->top = layer->displayFrame.top;
312 res_rect->bottom = layer->displayFrame.bottom;
313 res_rect->right = layer->displayFrame.right;
401 * Configure the scaling mode according to the layer format
403 static void rgz_cfg_scale_mode(struct rgz_blt_entry* e, hwc_layer_1_t *layer)
409 IMG_native_handle_t *handle = (IMG_native_handle_t *)layer->handle;
448 * top most layer while src2 is the one behind. If src2 is NULL means src1 will
480 OUTE("src2 layer %p has scaling, this is not supported", hwc_src2);
542 /* Begin from index 1 to remove the background layer from the output */
550 * See if it is needed to put transparent pixels where this layer
566 OUTE("bvcmd_paint: error in layer %d: %d", i, rv);
591 static float getscalew(hwc_layer_1_t *layer)
593 int w = WIDTH(layer->sourceCrop);
594 int h = HEIGHT(layer->sourceCrop);
596 if (layer->transform & HWC_TRANSFORM_ROT_90)
599 return ((float)WIDTH(layer->displayFrame)) / (float)w;
602 static float getscaleh(hwc_layer_1_t *layer)
604 int w = WIDTH(layer->sourceCrop);
605 int h = HEIGHT(layer->sourceCrop);
607 if (layer->transform & HWC_TRANSFORM_ROT_90)
610 return ((float)HEIGHT(layer->displayFrame)) / (float)h;
670 hwc_layer_1_t *layer = ra[i].hwc_layer;
672 int top = layer->displayFrame.top;
673 int bottom = layer->displayFrame.bottom;
676 int right = layer->displayFrame.right;
692 * 1. Get the offsets (left/right positions) of each layer within the
695 * 3. Each layer will have a different z-order, for each z-order
703 hwc_layer_1_t *layer = hregion->rgz_layers[l]->hwc_layer;
705 int left = layer->displayFrame.left;
706 int right = layer->displayFrame.right;
724 hwc_layer_1_t *layer = hregion->rgz_layers[l]->hwc_layer;
725 if (rgz_hwc_intersects(&subregion, &layer->displayFrame)) {
739 static int rgz_hwc_scaled(hwc_layer_1_t *layer)
741 int w = WIDTH(layer->sourceCrop);
742 int h = HEIGHT(layer->sourceCrop);
744 if (layer->transform & HWC_TRANSFORM_ROT_90)
747 return WIDTH(layer->displayFrame) != w || HEIGHT(layer->displayFrame) != h;
750 static int rgz_in_valid_hwc_layer(hwc_layer_1_t *layer)
752 IMG_native_handle_t *handle = (IMG_native_handle_t *)layer->handle;
753 if ((layer->flags & HWC_SKIP_LAYER) || !handle)
763 if (layer->transform) {
764 int is_flipped = !!(layer->transform & HWC_TRANSFORM_FLIP_H) ^ !!(layer->transform & HWC_TRANSFORM_FLIP_V);
766 ALOGE("Layer %p is flipped %d", layer, layer->transform);
804 * clear fb hint, but we want to maintain a layer state for dirty
841 * Workaround: If a NV12 layer is present in the list, don't even try
856 * Insert the background layer at the beginning of the list, maintain a
879 * Use only the layer rectangle as an input to regionize when the clear
880 * fb hint is present, mark this layer to identify it.
894 unsigned int blit_layers = possible_blit + 1; /* Account for background layer */
914 int dispw; /* widest layer */
956 hwc_layer_1_t *layer = rgz_layers[j].hwc_layer;
957 if (rgz_hwc_intersects(&hregions[i].rect, &layer->displayFrame)) {
978 * generate a human readable description of the layer
989 e -= snprintf(end - e, e, "<!-- LAYER-DAT: %d", idx);
1067 OUTP("<!-- LAYER-VIS: %d: rect: %d %d %d %d -->",
1186 * (with no flip) is intended for the layer, so we return 0 in that case.
1202 hwc_layer_1_t* layer = rgz_layer->hwc_layer;
1204 rgz_get_displayframe_rect(layer, &srcregion);
1207 if (!noblend && layer->blending == HWC_BLENDING_PREMULT)
1216 * Calculate the src rectangle on the basis of the layer display, source crop
1220 static void rgz_get_src_rect(hwc_layer_1_t* layer, blit_rect_t *subregion_rect, blit_rect_t *res_rect)
1222 IMG_native_handle_t *handle = (IMG_native_handle_t *)layer->handle;
1231 * If the layer is scaled we use the whole cropping rectangle from the
1234 * a scaled layer. If there is a transform, adjust the width and height
1237 if (rgz_hwc_scaled(layer)) {
1240 res_width = WIDTH(layer->sourceCrop);
1241 res_height = HEIGHT(layer->sourceCrop);
1242 if (layer->transform & HAL_TRANSFORM_ROT_90)
1245 delta_top = subregion_rect->top - layer->displayFrame.top;
1246 delta_left = subregion_rect->left - layer->displayFrame.left;
1255 switch(layer->transform) {
1257 res_left = layer->sourceCrop.left + delta_left;
1258 res_top = layer->sourceCrop.top + delta_top;
1261 res_left = handle->iHeight - layer->sourceCrop.bottom + delta_left;
1262 res_top = layer->sourceCrop.left + delta_top;
1265 res_left = handle->iWidth - layer->sourceCrop.right + delta_left;
1266 res_top = handle->iHeight - layer->sourceCrop.bottom + delta_top;
1269 res_left = layer->sourceCrop.top + delta_left;
1270 res_top = handle->iWidth - layer->sourceCrop.right + delta_top;
1273 OUTE("Invalid transform value %d", layer->transform);
1321 /* Check if the bottom layer is the background */
1324 /* Background layer is the only operation, clear subregion */
1328 /* No need to generate blits with background layer if there is
1329 * another layer on top of it, discard it
1337 * See if the depth most layer needs to be ignored. If this layer is the
1369 /* Return index to the first operation and make a copy of the first layer */
1502 /* Begin from index 1 to remove the background layer from the output */
1508 hwc_layer_1_t *layer = rgz_layer->hwc_layer;
1509 params->data.bvc.out_hndls[i++] = layer->handle;
1564 OUTP("<!-- BEGUN-LAYER-DUMP: %d -->", list->numHwLayers);
1566 OUTP("<!-- ENDED-LAYER-DUMP -->");