Commit 00c28704 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

nativewindowpriv: GRALLOC_USAGE_EXTERNAL_DISP only for hw

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8ce86469
...@@ -151,13 +151,15 @@ int ANativeWindowPriv_setup( native_window_priv *priv, int w, int h, int hal_for ...@@ -151,13 +151,15 @@ int ANativeWindowPriv_setup( native_window_priv *priv, int w, int h, int hal_for
LOGD( "setup: %p, %d, %d, %X, %X\n", LOGD( "setup: %p, %d, %d, %X, %X\n",
priv->anw, w, h, hal_format, hw_usage ); priv->anw, w, h, hal_format, hw_usage );
if (is_hw) if( is_hw )
{
priv->usage = hw_usage | GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE; priv->usage = hw_usage | GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE;
else
priv->usage= GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN;
#if ANDROID_HC_OR_LATER #if ANDROID_HC_OR_LATER
priv->usage |= GRALLOC_USAGE_EXTERNAL_DISP; priv->usage |= GRALLOC_USAGE_EXTERNAL_DISP;
#endif #endif
}
else
priv->usage = GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN;
err = native_window_set_usage( priv->anw, priv->usage ); err = native_window_set_usage( priv->anw, priv->usage );
CHECK_ERR(); CHECK_ERR();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment