Since all pullers now use StatsEvent instead of StatsLogEventWrapper,
this class can be deleted.
Test: m -j
Test: m -j statsd_test
Bug: 146578681
Change-Id: I63013768ee13af0235f8cd857ca3fc16d2fd877f
Bug: 147877556
Test: I72b5f28903a67445bc205cdad8848384ad675b31
In Bitmap#compress and AndroidBitmap_compress, remove the conversion
from F16 to 8888 P3. This was originally done because F16 forced a
particular ColorSpace, and we wanted to use a wider gamut than SRGB.
Now that F16 can be any RGB ColorSpace, encode it with the ColorSpace
that it already has. Skip the conversion to 8888, which is unnecessary.
The encoders can already convert from F16.
Remove Bitmap::CompressResult. Now that compress does not allocate a
Bitmap, there is no reason to return ALLOCATION_FAILED.
Change-Id: I8190664398e762daf57092d919f382a56267dd07
Bug: 135133301
Test: Iffe659e50078139188c3325545624640ae177cc2
Implement AImageDecoderHeaderInfo_getDataSpace, which reports the
default ADataSpace to decode to. It may report ADATASPACE_UNKNOWN, which
means that we've mostly left the colors in their original color profile.
This matches android.graphics.ImageDecoder/BitmapFactory, which would
use a ColorSpace named "Unknown". (It will standardize on DISPLAY_P3 for
some profiles, which again matches the Java classes.)
Implement AImageDecoder_setDataSpace, which allows specifying the
ADataSpace to decode to. It only supports explicit ADataSpaces.
Change-Id: Iba2f9e09531c23fae83ebe13cb9d18394ee3cd59
Test: Confirmed drawing is unaffected on pixel 3, confirmed all commands are recorded.
Change-Id: Ib543730c321f5082d9a2331241873f9b2e8289c8
Bug: skia:9758
Move ASurfaceTexture JNI implementation from libandroid to
libnativedisplay.
TextureLayer uses ASurfaceTexture_fromSurfaceTexture from
libnativedisplay instead of libandroid_runtime code.
libgui is no longer leaked through surface_texture_platform.h.
DeferredLayerUpdater uses ASurfaceTexture_release instead of
private ASurfaceTexture dtor.
Test: pass CtsUiRenderingTestCases and CtsViewTestCases
Bug: 147060713
Exempt-From-Owner-Approval: Changed only a header path in android_hardware_camera2_legacy_LegacyCameraDevice.cpp
Change-Id: I9720d9c383f8120f9db116fd2b74fc241af84396
Rename HWUI ATRACE counters from "Graphics CPU Memory",
"Graphics Texture Memory" and "GPU Memory" to "HWUI CPU Memory",
"HWUI Texture Memory" and "HWUI GPU Memory". New names apply
for purgeable memory, but with "Purgeable " prefix.
Add a new counter "HWUI All Memory", which is a sum of the other 3.
New counter simplifies perfetto query needed to detect a
memory regression.
Bug: 147833967
Test: Ran systrace
Change-Id: I39e0c6e1dbd21b67f457cc58f3fa94eb24d64d56
Bug: 135133301
Test: Ifbcb41388a48afc64bb22623bb7e981b288b2457
Refactor the bulk of Bitmap_compress into hwui/Bitmap::compress, so that
it can be shared by the new API. Update its enum to match the proper
style. Also make the enum a class so it does not need to have a special
return value for a bad parameter, which is now handled by the caller.
Add ABitmap_compress, which implements the new API by calling
hwui/Bitmap::compress.
Change-Id: Ia8ba4c17b517a05b664c6e317e235836473fd7f6
Bug: 135133301
Test: ?
Create an SkColorSpace for HAL_DATASPACE_TRANSFER_ST2084 and
HAL_DATASPACE_TRANSFER_SMPTE_170M. This allows converting
ADATASPACE_BT709, ADATASPACE_BT2020, and ADATASPACE_BT709 into
SkColorSpaces. In addition, treat HAL_DATASPACE_DCI_P3 (aka
HAL_DATASPACE_DCI_P3) specially, because its gamut does not match
SkNamedGamut::kSRGB.
This will allow Ia8ba4c17b517a05b664c6e317e235836473fd7f6 to use
DataSpaceToColorSpace, rather than its own, slightly different version.
Change-Id: I24fffd79c2bf251c28c2d0b8c3d2889dbffa772d
Bug: 135133301
Test: I48e49ee08ab1954eddf62ecae87942aeb128c10d
As described in I3381582e27894e1072db9b8635f3762b801f5d69, this is a
more sensible API.
In addition, remove unused methods on ImageDecoder.
Lastly, update AImageDecoder methods in the map to document which API
level they were introduced in.
Change-Id: I1aff544e8d6932b9ed0931a00da66a0aba6cd536
Updated native hwui implementation to pass in
optional anti-alias flag to canvas clipping operations.
Made the default behavior to enable canvas clipping
Bug: 69115461
Test: Added test to CtsUiRenderingTestCases
Change-Id: I996f4b56e161cdc9f1ec5eba9c30f94474520af5
Overlays targeting shared libraries should be loaded into the
resources of every target that depends on the shared library.
Static shared libraries are currently not supported because overlays
should override all versions of static shared libraries and there is
not currently support for an overlay targeting multiple APKs.
Also created a test instrumentation and host test suite for testing
overlays and packages on the system image.
Bug: 140790224
Test: atest OverlayRemountedTest
Change-Id: I20a217b6368d6cf92b2b9f46908fd58012933f72
When a shared library package is loaded into an AssetManager, the
shared library will be assigned a unique package id. Subsequent
AssetManaagers that load a shared library of the same package name
as the original shared library will use previously assigned package
name. Shared libraries will have stable package ids throughout the
lifetime of application.
Bug: 140790224
Bug: 128496033
Test: libandroidfw_tests
Test: third-party app no longer crashes on open
Test: atest CtsHostsideWebViewTests
Change-Id: Idc0315be21ea00b74d1a918b7083ad655104c008
Test: built for pixel3, confirm shadows on text of launcher icons visible on a background image that shows it well.
Bug:144199311
Change-Id: Ia2e71a1f0982ef94a9b0c0573bf76ead0c0b9b81
Add ATRACE memory counters to track memory usage at the end
of each frame in HWUI.
There are 3 catagories: CPU, GPU and Texture memory.
There are 3 more counters for memory that can be purged.
This CL deletes GpuMemoryTracker class, which implemented
similar function for Android O HWUI renderer.
Test: Collected systrace with gmail and setting.
Test: memory tracing adds ~0.1ms per frame when ATRACE is enabled
Bug: 146580770
Change-Id: Icbcc0478bc426dff578e83726fe7c95df171ed93
Add atom definition for HWUI stats. Implement a C++
statsd puller inside GraphicsStatsService service.
GraphicsStatsService has new private API, which
returns a serialized proto with HWUI stats grouped
by application package and version.
Test: Ran "adb shell cmd stats pull-source 10068"
Test: Ran "statsd_testdrive 10068" and it looks OK
Bug: 142665516
Change-Id: I400c0dbf9e25181d36f9018688b03d86839ac3de
For some pixel formats, stride has no meaning.
Take this into account and use buffer width instead.
Bug: 143470518
Change-Id: I728b40803e80c4e534504c5b9db55921bb5e7dbc
Merged-In: I728b40803e80c4e534504c5b9db55921bb5e7dbc
Test: android.graphics.cts.ImageDecoderTest#testConserveMemoryPlusHardware
InputReader is responsible to associate device and display so it makes
sense to allow it set display viewport for pointer controller.
Bug: 146385350
Test: Cursor can be associated with external freeform displays as
expected.
Change-Id: I00d664dd180f1e693b1900582feea8f7ff02f93c
For some pixel formats, stride has no meaning.
Take this into account and use buffer width instead.
Bug: 143470518
Change-Id: I728b40803e80c4e534504c5b9db55921bb5e7dbc
Test: android.graphics.cts.ImageDecoderTest#testConserveMemoryPlusHardware
* Remove unused header in EglManager
* Rename usage of rotation flags to use the public names.
Bug: 137012798
Test: builds
Change-Id: Ia603e8d74c6ba51f77e352333d1e82816582d827