summaryrefslogtreecommitdiff
path: root/graphics
AgeCommit message (Collapse)Author
2020-02-20Merge "Add details regarding setConvexPath deprecation"Leon Scroggins
2020-02-20Add details regarding setConvexPath deprecationLeon Scroggins III
Bug: 149857968 Test: make docs Change-Id: I995e035fc7d73d196a50b4e515db38110baa0fe5
2020-02-18Add Bitmap#getHardwareBufferLeon Scroggins III
Bug: 148155907 Bug: 135299581 Test: TODO Hidden for now. We'd like to make it an SDK API eventually (b/148155907). Internal code is currently calling createGraphicBufferHandle. This is not something we plan to expose from the UI rendering module, so add a method to get a HardwareBuffer instead. This is something we were already planning to add. It seems that clients of createGraphicBufferHandle really wanted a Parcelable to pass the HARDWARE Bitmap to another thread. This should satisfy that use case. Change-Id: Id701f7c7eab37830cd7d2cdb929cbe6ba4eca119
2020-02-14Merge "Move RenderNodeAnimator to android.graphics.animation package"Derek Sollenberger
2020-02-14Merge "Create a ParcelableColorSpace"TreeHugger Robot
2020-02-13Move RenderNodeAnimator to android.graphics.animation packageDerek Sollenberger
A wrapper still exists at android.view.RenderNode animator as it needs access to internals of the view that would violate the package layering if moved into android.graphics.animation. This CL also moves the Java and cpp files associated with creating a native interpolator that can be run directly on the RenderThread. Bug: 149293249 Test: CtsViewTestCases Change-Id: I5260331fedbd634cf2f6d6d392941e7284527420
2020-02-12Create a ParcelableColorSpaceJohn Reck
Bug: 148412652 Test: ParcelableColorSpaceTest CTS Change-Id: If0901367e501e2ecfc71b9ed29ec7d8dd4d0550f
2020-02-11Merge "Consolidate AssetManager calls in Font/FontFamily"Derek Sollenberger
2020-02-10Consolidate AssetManager calls in Font/FontFamilyDerek Sollenberger
The Font/FontFamily classes use private API calls in native code to get the contents of an Asset. These calls need to be made on public APIs in order to isolate the graphics module from the rest of the system. Public Java APIs already exist so this CL refactors the code to use those methods. Test: CtsTextTestCases Bug: 147136234 Change-Id: I35a6558b597684e59279d7a841669c5f909d5152
2020-02-07Refactor GraphicsStatsService for updateabilityStan Iliev
Move GraphicsStatsService to android.graphics package. Move GraphicsStatsService JNI from libservices.core to libandroid_runtime. Declare GraphicsStatsService ctor as the only @SystemApi. Remove MemoryFile usage from GraphicsStatsService, but use SharedMemory and other SDK APIs instead. This is done to avoid using unstable API MemoryFile.getFileDescriptor. Propose new SharedMemory.getFdDup API for next release, which is hidden for now. Refactor statsd puller to avoid proto serialization by moving data directly into AStatsEventList. "libprotoutil" is added as a static dependancy to libhwui, which should be fine because its implementation does not link anything. Bug: 146353313 Test: Ran "adb shell cmd stats pull-source 10068" Test: Passed unit tests and GraphicsStatsValidationTest CTS Change-Id: If16c5addbd519cba33e03bd84ac312595032e0e1
2020-02-06Ensure SkiaPipeline always has a valid colorspace.Derek Sollenberger
Previously we didn't assign a colorspace to the pipeline until it was provided a surface to render into. This resulted in undefined behavior if the application attempted to render an offscreen layer before the OS provided the main window with its surface. Now instead of deferring setting whether or not the application is wide gamut we do initialize it to a default setting when the pipeline is created. Bug: 148042673 Test: apct/device_boot_health_check_extra_postsubmit Change-Id: I84d743511e949ac977486470bb14eec936de7f88
2020-01-31Replace Outline#setConvexPath with Outline#setPathLeon Scroggins III
Bug: 148544953 Test: No change in behavior, no new tests setConvexPath no longer requires that the Path be Convex, so deprecate the method and replace it with a name that does not imply it must be Convex. Update internal references to the Path being Convex as well. Change-Id: I8935dc8ac7f7fb7db0d667e35fda67afdf2e6ac8
2020-01-29Merge "Deprecate Path#isConvex"Leon Scroggins
2020-01-28Merge "Deprecate Canvas.EdgeType"TreeHugger Robot
2020-01-24Improve bitmap IPCJohn Reck
Make all received bitmaps immutable as this improves re-use for subsequent transfers. Remove minimum size to stay on ashmem, as Parcel's writeBlob already has similar logic. This effectively reduces the minimum size to 16kB. Bug: 148301859 Test: device booted, a notification showed up Change-Id: I2fafb0989944c0ef82de6edcb4924056a592cf66
2020-01-23Deprecate Canvas.EdgeTypeLeon Scroggins III
Bug: 129694386 Test: No change in behavior, no new tests EdgeType is only used as a parameter to quickReject, but it is always ignored. Deprecate it and the existing quickReject methods. Add new versions of quickReject without EdgeType parameters. Switch clients to the new versions. Change-Id: Id932f10915a8c4959fe0e85f507ce7fd2da8a576
2020-01-23Deprecate Path#isConvexLeon Scroggins III
Bug: 133807397 Test: No change in behavior, no new tests isConvex is unreliable. We may change how we compute it from release to release, and it could change based on various factors like a rotation. Change-Id: Ib76246fc24f09bd13cf63b4b96b56afa613d0bc9
2020-01-21Adding API to check if an icon returned by PackageManagerSunny Goyal
is a fallback icon Bug: 141588119 Test: atest PackageManagerTest Change-Id: I9ae5a74dd0b0c0c49a078d46914986ecb0d27a94
2020-01-15DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into ↵Xin Li
stage-aosp-master Bug: 146167222 Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
2020-01-14Restrict UnsupportedAppUsage after QHaoyu Zhang
Bug: 145986883 Test: atest FontFamilyTest Test: adb shell am instrument -w -r -e class 'androidx.core.graphics.TypefaceCompatTest' androidx.core.test/androidx.test.runner.AndroidJUnitRunner Change-Id: I1cf0444b93df00532536531903e889ade9612597
2020-01-14Merge "Use new UnsupportedAppUsage annotation."Treehugger Robot
2020-01-10Merge "Use new UnsupportedAppUsage annotation." am: 57a0beab18 am: 2eff83dcb3Automerger Merge Worker
Change-Id: I48f93c43b66f4d329ef6068b4f74b4c68809c099
2020-01-09Use new UnsupportedAppUsage annotation.Artur Satayev
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I8ffa1da1bcd43c25f4ff817575db77a33c0f3d31 Merged-In: I8ffa1da1bcd43c25f4ff817575db77a33c0f3d31
2020-01-09Use new UnsupportedAppUsage annotation.Artur Satayev
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I4bc8c9482e4bb1af21363f951affff7ee3fefeab Merged-In: I4bc8c9482e4bb1af21363f951affff7ee3fefeab
2020-01-08Merge "Use new UnsupportedAppUsage annotation."TreeHugger Robot
2020-01-07Merge "Handle null assetFd like a FNF"Leon Scroggins
2020-01-07Use new UnsupportedAppUsage annotation.Artur Satayev
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I8ffa1da1bcd43c25f4ff817575db77a33c0f3d31
2020-01-03Use SkRuntimeEffect rather than SkRuntimeShaderFactoryBrian Osman
The old API was a shim over the new API, and will be deleted soon. The new API is actually public, simpler, and more powerful. Test: Everything still builds. Change-Id: I11af8da9132e23a070e87dd5a7401c4854dd102a
2019-12-18Use new UnsupportedAppUsage annotation.Artur Satayev
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I4bc8c9482e4bb1af21363f951affff7ee3fefeab
2019-12-18Merge "Move FrameMetricsObserver logic into UI Module."Derek Sollenberger
2019-12-17Merge "ImageDecoder: compare Strings with .equals()"TreeHugger Robot
2019-12-17Move FrameMetricsObserver logic into UI Module.Derek Sollenberger
Introduce HardwareRendererObserver to isolate the android.graphics package from the android.view package. The native code that interacts with the observer was also moved from libandroid_runtime to libandroid_graphics to keep it within the confines of the UI Rendering module. Bug: 137655431 Test: CtsUiRenderingTestCases Change-Id: Ibccecbeda0c4d9501d86514a53eb98548233ba6a
2019-12-17Merge "Revert submission"TreeHugger Robot
2019-12-17Revert submissionNader Jawad
Reason for revert: Causes regressions tracked in: b/145900622 b/145864909 b/145948923 Change-Id: Ia24ece94d5281cd25d990d8cae923cf50497e1f1
2019-12-16Revert "Rmove @UnsupportedAppUsage"Haoyu Zhang
This reverts commit 351df0901d4e00d7360c5a94fe089db152aea6c4. Bug: 146181012 Bug: 145986883 Bug: 146318594 Bug: 146316215 Bug: 146315595 Reason for revert: This changed caused APP crash. Change-Id: I0a1863176bf80ba5ad044621b5a2ff72e0d57fa4
2019-12-12Rmove @UnsupportedAppUsageHaoyu Zhang
Bug: 145986883 Test: atest FontFamilyTest Test: adb shell am instrument -w -r -e class 'androidx.core.graphics.TypefaceCompatTest' androidx.core.test/androidx.test.runner.AndroidJUnitRunner Change-Id: Iac6b9cb0dde2289604e5ec4b9bff8930fd9a4229
2019-12-11Merge "ImageDecoder: Disallow empty/unsorted crop rects"Leon Scroggins
2019-12-06ImageDecoder: Disallow empty/unsorted crop rectsLeon Scroggins III
Bug: 135133301 Test: Idf64474f28c0bf3f77616a31d843d84fbfd570ab If the specified crop Rect is empty or unsorted, throw an IllegalStateException, like we do if the Rect does not fit in the target size. This is a change in behavior to make it more consistent. Here are the specific behavior changes: - an empty crop rect was previously supported in all cases, but would result in a zero width and/or height Bitmap/Drawable. If one dimension is non-zero, it still affects layout, though nothing is drawn. This is not useful, so the new Exception is more helpful. (It is also more consistent with setTargetSize, which throws an IllegalArgumentException for non-positive dimensions.) - a negative width or height in decodeBitmap, or on a static image in decodeDrawable, previously threw an IOException when trying to call SkBitmap::setInfo with a negative width or height. Throwing an IllegalStateException is more consistent with other invalid crop rects - a negative width or height in decodeDrawable on an animated image previously resulted in an AnimatedImageDrawable with a negative intrinsic width and/or height. When passed to an ImageView, this dimension ends up being 1. Again, this does not seem useful. Change-Id: I15d2f77125799413eaf55d417e98ff34599e2eb4
2019-12-05Rename writeToProto to be dumpDebugJeffrey Huang
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules. The #dumpDebug name is more appropriate than #writeToProto. Bug: 142279786 Test: Manual Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
2019-12-03Implement a new Shader API, which can run custom code on GPUStan Iliev
Add RuntimeShader hidden API, which calculates pixel output with a fragment shader running on GPU. Extend ColorFiltersMutateActivity HWUI test to use new API and show how to animate uniforms on UI thread. Test: Updated HwAccelerationTest Change-Id: Ia26e44259b12099924facba250880cbbd9be21c7
2019-11-19ImageDecoder: compare Strings with .equals()Leon Scroggins III
Bug: 143231863 Test: Infeasible? Previously we compared with "==", which requires that the two String objects be the same to return true. We want to return true if the two Strings are logically equal, even if they are different objects. Prior to this commit, we may have accidentally called openAssetFileDescriptor when we should have called openTypedAssetFileDescriptor. Change-Id: I9229039b752bafa9a9b85b914a62093dff1eec34
2019-11-14Adds adaptive bitmap support to URI based iconsMehdi Alizadeh
Adds a new creator method to accept a Uri and set an internal flag for Adaptive bitmap, and return adaptive bitmap drawable on loadDrawable(). Bug: 142831407 Test: atest IconTest Change-Id: Iefee1aaa154a47fc9e5ed1e1c03587a3c8fb6da9
2019-11-11Merge "docs: Fix docs for Canvas#drawTextOnPath add parameter descriptions ↵Joshua Baxter
for index and count in drawTextOnPath fix a couple of typos" into qt-dev am: 228d235d5b am: 5f4d7e4ac5 am: d59ed2f2a7 am: 3f7792b9bc Change-Id: I099ad12cdb39780acc8a4a17418bebb812b4f477
2019-11-11Merge "docs: Fix docs for Canvas#drawTextOnPath add parameter descriptions ↵Joshua Baxter
for index and count in drawTextOnPath fix a couple of typos" into qt-dev am: 228d235d5b am: 5f4d7e4ac5 am: d59ed2f2a7 Change-Id: I8e2b227a3e54c75feec00e574bf219c5a24e0d8f
2019-11-11Merge "docs: Fix docs for Canvas#drawTextOnPath add parameter descriptions ↵Joshua Baxter
for index and count in drawTextOnPath fix a couple of typos" into qt-dev
2019-11-08Merge "Remove native calls to HWUI from Surface and use the public API instead"Derek Sollenberger
2019-11-06Merge "docs: fix typos" into qt-dev am: f6c85f3c0d am: 256363052e am: bd87d666ebJoshua Baxter
am: 28a023d243 Change-Id: I24cecf7107959da96b5969d7f901dfc40b308932
2019-11-06Merge "docs: fix typos" into qt-dev am: f6c85f3c0d am: 256363052eJoshua Baxter
am: bd87d666eb Change-Id: I8e78ea52159d64334ba1d2ed5b5fa08beaf270f4
2019-11-06docs: fix typosJoshua Baxter
Change-Id: Ica9765713212955caf3c7fb246ef4ad8ca0e1c35 test: make ds-docs bug: 113636515
2019-11-06docs: Fix docs for Canvas#drawTextOnPathJoshua Baxter
add parameter descriptions for index and count in drawTextOnPath fix a couple of typos test: make ds-docs Bug: 36969777 Change-Id: I7c451fac4468fb2066b9b29a321fad57785a8a36