From 36d2d1b4bfd34f966372631d27717574b1973761 Mon Sep 17 00:00:00 2001 From: Dirk Dougherty Date: Sun, 20 Feb 2011 00:40:38 -0800 Subject: Doc change: Add doc for GL texture declaration/filtering, hardwareAccelerated manifest attr. Change-Id: Ia6edc7d48341e7eb58172049219cf6d076126a8b --- docs/html/guide/appendix/market-filters.jd | 9 + docs/html/guide/guide_toc.cs | 1 + .../html/guide/topics/manifest/activity-element.jd | 19 +++ .../guide/topics/manifest/application-element.jd | 22 ++- docs/html/guide/topics/manifest/manifest-intro.jd | 2 + .../topics/manifest/supports-gl-texture-element.jd | 187 +++++++++++++++++++++ 6 files changed, 239 insertions(+), 1 deletion(-) create mode 100644 docs/html/guide/topics/manifest/supports-gl-texture-element.jd (limited to 'docs') diff --git a/docs/html/guide/appendix/market-filters.jd b/docs/html/guide/appendix/market-filters.jd index f826f43..ef1deba 100644 --- a/docs/html/guide/appendix/market-filters.jd +++ b/docs/html/guide/appendix/market-filters.jd @@ -24,6 +24,8 @@ manifest file to the configurations defined by the device, as well as other fact
  • Android Compatibility
  • <supports-gl-texture>
  • +
  • <supports-screens>
  • <uses-configuration>
  • @@ -395,5 +397,12 @@ href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code with alternative resources.

    + + {@code +<supports-gl-texture>} + +

    Android Market filters the application unless one or more of the GL texture compression formats supported by the application are also supported by the device.

    + + diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs index c0c96cc..d1d1212 100644 --- a/docs/html/guide/guide_toc.cs +++ b/docs/html/guide/guide_toc.cs @@ -225,6 +225,7 @@
  • <provider>
  • <receiver>
  • <service>
  • +
  • <supports-gl-texture>
  • <supports-screens>
  • <uses-configuration>
  • <uses-feature>
  • diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd index 5e0b536..2a148d0 100644 --- a/docs/html/guide/topics/manifest/activity-element.jd +++ b/docs/html/guide/topics/manifest/activity-element.jd @@ -14,6 +14,7 @@ page.title=<activity> android:excludeFromRecents=["true" | "false"] android:exported=["true" | "false"] android:finishOnTaskLaunch=["true" | "false"] + android:hardwareAccelerated=["true" | "false"] android:icon="drawable resource" android:label="string resource" android:launchMode=["multiple" | "singleTop" | @@ -286,6 +287,24 @@ are both "{@code true}", this attribute trumps the other. The affinity of the activity is ignored. The activity is not re-parented, but destroyed.

    +
    {@code android:hardwareAccelerated}
    +
    Whether or not hardware-accelerated rendering should be enabled for this +Activity — "{@code true}" if it should be enabled, and "{@code false}" if +not. The default value is "{@code false}". + +

    Starting from Android 3.0, a hardware-accelerated OpenGL renderer is +available to applications, to improve performance for many common 2D graphics +operations. When the hardware-accelerated renderer is enabled, most operations +in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated. +This results in smoother animations, smoother scrolling, and improved +responsiveness overall, even for applications that do not explicitly make use +the framework's OpenGL libraries.

    + +

    Note that not all of the OpenGL 2D operations are accelerated. If you enable +the hardware-accelerated renderer, test your application to ensure that it can +make use of the renderer without errors.

    +
    +
    {@code android:icon}
    An icon representing the activity. The icon is displayed to users when a representation of the activity is required on-screen. For example, icons diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd index 1fadc6e..daa84e3 100644 --- a/docs/html/guide/topics/manifest/application-element.jd +++ b/docs/html/guide/topics/manifest/application-element.jd @@ -9,6 +9,7 @@ page.title=<application> android:description="string resource" android:enabled=["true" | "false"] android:hasCode=["true" | "false"] + android:hardwareAccelerated=["true" | "false"] android:icon="drawable resource" android:killAfterRestore=["true" | "false"] android:label="string resource" @@ -108,7 +109,26 @@ The default value is "{@code true}".

    An application would not have any code of its own only if it's using nothing but built-in component classes, such as an activity that uses the {@link -android.app.AliasActivity} class, a rare occurrence. +android.app.AliasActivity} class, a rare occurrence.

    +
    + +
    {@code android:hardwareAccelerated}
    +
    Whether or not hardware-accelerated rendering should be enabled for all +Activities and Views in this application — "{@code true}" if it +should be enabled, and "{@code false}" if not. The default value is "{@code false}". + +

    Starting from Android 3.0, a hardware-accelerated OpenGL renderer is +available to applications, to improve performance for many common 2D graphics +operations. When the hardware-accelerated renderer is enabled, most operations +in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated. +This results in smoother animations, smoother scrolling, and improved +responsiveness overall, even for applications that do not explicitly make use +the framework's OpenGL libraries.

    + +

    Note that not all of the OpenGL 2D operations are accelerated. If you enable +the hardware-accelerated renderer, test your application to ensure that it can +make use of the renderer without errors.

    +
    {@code android:icon}
    An icon for the application as whole, and the default icon for diff --git a/docs/html/guide/topics/manifest/manifest-intro.jd b/docs/html/guide/topics/manifest/manifest-intro.jd index d7a3e3e..0f20305 100644 --- a/docs/html/guide/topics/manifest/manifest-intro.jd +++ b/docs/html/guide/topics/manifest/manifest-intro.jd @@ -83,6 +83,8 @@ other mention of the element name. <uses-configuration /> <uses-feature /> <supports-screens /> + <compatible-screens /> + <supports-gl-texture /> <application> diff --git a/docs/html/guide/topics/manifest/supports-gl-texture-element.jd b/docs/html/guide/topics/manifest/supports-gl-texture-element.jd new file mode 100644 index 0000000..2b9f06e --- /dev/null +++ b/docs/html/guide/topics/manifest/supports-gl-texture-element.jd @@ -0,0 +1,187 @@ +page.title=<supports-gl-texture> +@jd:body + +
    + +
    syntax:
    +
    +
    +<supports-gl-texture android:name="string" />
    +
    +
    + +
    contained in:
    +
    <manifest>
    + + + +
    description:
    +
    Declares a single GL texture compression format that is supported by +the application. + +

    An application "supports" a GL texture compression format if it is capable of +providing texture assets that are compressed in that format, once the +application is installed on a device. The application can provide the +compressed assets locally, from inside the .apk, or it can download them +from a server at runtime.

    + +

    Each <supports-gl-texture> element declares exactly one +supported texture compression format, specified as the value of a +android:name attribute. If your application supports multiple +texture compression formats, you can declare multiple +<supports-gl-texture> elements. For example:

    + +
    <supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" />
    +<supports-gl-texture android:name="GL_OES_compressed_paletted_texture" />
    + +

    Declared <supports-gl-texture> elements are informational, +meaning that the Android system itself does not examine the elements at install +time to ensure matching support on the device. However, other services +(such as Android Market) or applications can check your application's +<supports-gl-texture> declarations as part of handling or +interacting with your application. For this reason, it's very important that +you declare all of the texture compression formats (from the list below) that +your application is capable of supporting.

    + +

    Applications and devices typically declare their supported GL texture +compression formats using the same set of well-known strings, as listed below. +The set of format strings may grow over time, as needed, and since the values +are strings, applications are free to declare other formats as needed.

    + +

    Assuming that the application is built with SDK Platform Tools r3 or higher, +filtering based on the <supports-gl-texture> element is activated +for all API levels.

    + +
    attributes:
    + +
    +
    + +
    {@code android:name}
    +
    Specifies a single GL texture compression format supported by the application, + as a descriptor string. Common descriptor values are listed in the table below. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Texture Compression Format DescriptorComments
    GL_OES_compressed_ETC1_RGB8_textureEricsson texture compression. Specified in OpenGL ES 2.0 and available in all +Android-powered devices that support OpenGL ES 2.0.
    GL_OES_compressed_paletted_textureGeneric paletted texture compression.
    GL_AMD_compressed_3DC_textureATI 3Dc texture compression.
    GL_AMD_compressed_ATC_textureATI texture compression. Available on devices running Adreno GPU, including +HTC Nexus One, Droid Incredible, EVO, and others. For widest compatibility, +devices may also declare a <supports-gl-texture> element with the +descriptor GL_ATI_texture_compression_atitc.
    GL_EXT_texture_compression_latcLuminance alpha texture compression.
    GL_EXT_texture_compression_dxt1S3 DXT1 texture compression. Supported on devices running Nvidia Tegra2 +platform, including Motorala Xoom, Motorola Atrix, Droid Bionic, and +others.
    GL_EXT_texture_compression_s3tcS3 texture compression, nonspecific to DXT variant. Supported on devices +running Nvidia Tegra2 platform, including Motorala Xoom, Motorola Atrix, Droid +Bionic, and others. If your application requires a specific DXT variant, declare +that descriptor instead of this one.
    GL_IMG_texture_compression_pvrtcPowerVR texture compression. Available in devices running PowerVR SGX530/540 +GPU, such as Motorola DROID series; Samsung Galaxy S, Nexus S, and Galaxy Tab; +and others.
    + +
    +
    + + + +
    see also:
    +
    + +
    + +

    Android Market and texture compression filtering

    + +

    Android Market filters the applications that are visible to users, so that +users can see and download only those applications that are compatible with +their devices. One of the ways Market filters applications is by texture +compression compatibility, giving you control over the availability of your +application to various devices, based on the capabilities of their GPUs.

    + +

    To determine an application's texture compression compatibility with a given +user's device, Android Market compares:

    + +
      +
    • Texture compression formats that are supported by the application — +an application declares its supported texture compression formats in +<supports-gl-texture> elements in its manifest
      with...
    • +
    • Texture compression formats that are supported by the GPU on the device — +a device reports the formats it supports as read-only system properties.
    • +
    + +

    Each time you upload an application to the Android Market Publisher Site, +Android Market scans the application's manifest file and looks for any +<supports-gl-texture> elements. It extracts the +format descriptors from the elements and stores them internally as +metadata associated with the application .apk and the application +version.

    + +

    When a user searches or browses for applications on Android Market, +the service compares the texture compression formats supported by the application +with those supported by the user's device. The comparison is based on the format +descriptor strings and a match must be exact.

    + +

    If any of an application's supported texture compression formats is +also supported by the device, Android Market allows the user to see the +application and potentially download it. Otherwise, if none of the application's +formats is supported by the device, Android Market filters the application so +that it is not available for download.

    + +

    If an application does not declare any <supports-gl-texture> elements, +Android Market does not apply any filtering based on GL texture compression format.

    + +
    + -- cgit v1.1