summaryrefslogtreecommitdiffstats
path: root/graphics
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add histogram intrinsic"Jason Sams2013-06-191-0/+143
|\
| * Add histogram intrinsicJason Sams2013-06-181-0/+143
| | | | | | | | Change-Id: I67bcaaef033d8770047923e8243e739010238539
* | Add Y8 and Y16 image formatZhijun He2013-06-181-2/+66
|/ | | | | | | These APIs are hidden. Also correct the value of RAW_SENSOR. Bug: 9254294 Change-Id: Ic6271f5f6bfcfdd8b545d69a9a2154241c34d73b
* Postpone creating new drawables for DrawableContainerState.Alan Viverette2013-06-132-105/+228
| | | | | | | | When creating a DrawableContainerState from a constant state, calls to ConstantState.newDrawable() are postponed and made as they are needed. Bug: 9280861 Change-Id: I03c93a43ee00aca3ff618d66d7f507f1722538d1
* Initial commit of new camera API, mostly just the interface.Eino-Ville Talvala2013-06-071-0/+39
| | | | | | | | | | | | - New core API classes in android.hardware.photography - android.media.Image and android.media.ImageReader classes for application access to direct hardware image buffers. - Additions to android.graphics.ImageFormat to describe new image types needed by new camera API. - Some documentation included; very little implementation. Bug: 9111736 Change-Id: I0680f35944d1cb8845b7dc0c67edc8c0f0864573
* Merge "Remove unnecessary Rect, better reuse of NinePatch objects"Romain Guy2013-06-073-27/+46
|\
| * Remove unnecessary Rect, better reuse of NinePatch objectsRomain Guy2013-06-073-27/+46
| | | | | | | | | | | | | | | | | | Cloning drawables (which happens a lot) was creating copies of NinePatch objects, which would cause the hardware renderer to generate more meshes than necessary. Also avoid keeping a String we don't need (it was interned but still.) Last but not least, remove 1 RectF per NinePatch in the system. Change-Id: If4dbfa0c30892c9b00d68875e334fd5c2bde8b94
* | Merge "Add support for post-decode density scaling with reuse"Chris Craik2013-06-061-103/+46
|\ \ | |/ |/|
| * Add support for post-decode density scaling with reuseChris Craik2013-06-051-103/+46
| | | | | | | | | | | | | | | | Also, simplifies scaling path, removing java variant - we always do the scaling in native, which has the benefit of avoiding non-native temporary allocations Change-Id: I39c2219f5d77a267719629704e65611cf4388a82
* | Merge "Deprecate DrawableStateList.getChildren() and add getChild()."Alan Viverette2013-06-064-12/+30
|\ \
| * | Deprecate DrawableStateList.getChildren() and add getChild().Alan Viverette2013-06-054-12/+30
| | | | | | | | | | | | | | | | | | | | | | | | Moves from exposing the internal structure of a drawable state list to only exposing the data. Adds getCapacity() and mutate() as package-private APIs to support various drawable subclasses. Change-Id: Id08743f979287e1a305f069ccc3c0085a7da6f7b
* | | Merge "Support all formats for BitmapFactory.Options.inBitmap"Chris Craik2013-06-061-0/+1
|\ \ \ | | |/ | |/|
| * | Support all formats for BitmapFactory.Options.inBitmapChris Craik2013-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:9194265 Instead of using custom code in skia to avoid allocations, use a custom allocator that reuses the allocations from the inBitmap. In order to avoid inconsistent state, the decode is done in a separate bitmap and swapped into the existing native bitmap. Eventually, we'd like to support inScaled=true completely avoiding java allocations. Change-Id: Ic4a2f2373b100a80a32c1cdebb7bcb726711c8a7
* | | am 379641a7: am ea45ab6f: Merge "Improve RS documentation." into jb-mr2-devTim Murray2013-06-0553-504/+519
|\ \ \ | |_|/ |/| | | | | | | | * commit '379641a7ef09e1d7fab34d3027c5809fb2bc21ad': Improve RS documentation.
| * | Improve RS documentation.Tim Murray2013-06-0553-504/+519
| | | | | | | | | | | | | | | bug 8570568 Change-Id: I465fcc8ec3e2cc892dc3cb0067aacf5224338102
* | | am d19068a7: am 413adc92: Merge "Fix free after use with ↵Jason Sams2013-06-011-1/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | createFromBitmapResource" into jb-mr2-dev * commit 'd19068a7d28d129f5a1a1be478e972b40cea04eb': Fix free after use with createFromBitmapResource
| * | Fix free after use with createFromBitmapResourceJason Sams2013-05-311-1/+4
| | | | | | | | | | | | | | | | | | Bug 9227350 Change-Id: Iee7610a9bf3d9d1baf14b968aed2a7d0876d2af7
* | | Remove MipmapDrawableRomain Guy2013-05-303-596/+0
| |/ |/| | | | | | | | | It's a hidden API that nobody uses. Change-Id: Ie0ecbc45cd191a595e53fe8765defe6f2aa7e3f6
* | Support larger bitmaps in BitmapFactory.Options.inBitmapChris Craik2013-05-282-21/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | bug:8121994 Adds a new distiction between bitmap size and the allocation (pixel ref/buffer) used to store its data. BitmapFactory.inBitmap will allow a bitmap to be reinitialized with new data if the bitmap being decoded is (after sampleSize) equal or smaller. Change-Id: I747750a735c858882df3af74fca6cdc46f2a9f81
* | am ac629ee8: am 529a9e39: Merge "TransitionDrawable should not become a ↵Romain Guy2013-05-241-1/+1
|\ \ | |/ | | | | | | | | | | LayerDrawable Bug #9057757" into jb-mr2-dev * commit 'ac629ee86d9e60e35098d8e731a35fc36b3bf3d5': TransitionDrawable should not become a LayerDrawable Bug #9057757
| * Merge "TransitionDrawable should not become a LayerDrawable Bug #9057757" ↵Romain Guy2013-05-251-1/+1
| |\ | | | | | | | | | into jb-mr2-dev
| | * TransitionDrawable should not become a LayerDrawableRomain Guy2013-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #9057757 Calling TransitionDrawable.mutate() would turn it into a LayerDrawable, causing it to draw all its children on screen at the same time. Change-Id: I5efa87c43114a9c817719f08890ce41965f3220a
* | | Add support to Java for RS tracing.Tim Murray2013-05-242-5/+92
| | | | | | | | | | | | Change-Id: I95c365345fea3a1e132a7eb2270d541be0745d02
* | | am ddd02537: am b4426f15: Merge "Fix bug #8858012 layer-list\'s bitmap ↵Fabrice Di Meglio2013-05-137-6/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | item\'s start/end gravity is incorrect on RTL under certain conditions" into jb-mr2-dev * commit 'ddd02537a3fb499a82097453535194f4e29583dc': Fix bug #8858012 layer-list's bitmap item's start/end gravity is incorrect on RTL under certain conditions
| * | Merge "Fix bug #8858012 layer-list's bitmap item's start/end gravity is ↵Fabrice Di Meglio2013-05-137-6/+12
| |\ \ | | | | | | | | | | | | incorrect on RTL under certain conditions" into jb-mr2-dev
| | * | Fix bug #8858012 layer-list's bitmap item's start/end gravity is incorrect ↵Fabrice Di Meglio2013-05-107-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on RTL under certain conditions - set correct layout direction for Drawable Change-Id: Ic8968acadbc7c9aa0bb68dd4dfbe09aa4e7cfa62
* | | | am 9917c1e2: am 17502c4b: Merge "Remove extraneous logging." into jb-mr2-devTim Murray2013-05-102-2/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '9917c1e2e9ba8a0bd4f29ce05844cd539c3a41b9': Remove extraneous logging.
| * | | Remove extraneous logging.Tim Murray2013-05-092-2/+2
| | |/ | |/| | | | | | | | | | | | | bug 8888887 Change-Id: I68d01c2ba649257be1577d53f330ad28d3b57011
* | | am c195ef73: am bee78812: Merge "Fix bug where we incorrectly clipped the ↵Derek Sollenberger2013-05-091-2/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | bounds to the device size." into jb-mr2-dev * commit 'c195ef73445c3ba605355798b9f1f9a78bc52f11': Fix bug where we incorrectly clipped the bounds to the device size.
| * | Fix bug where we incorrectly clipped the bounds to the device size.Derek Sollenberger2013-05-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | This CL also updates the documenation to make it clear that the API returns in local space, not clipped to the size of the bitmap/device. bug: 8747526 Change-Id: I389844672ce955341863f9940c3b401ab00dc1dc
* | | am e3326143: am 2c76016c: Merge "Fix error where clips/matrices are ↵Derek Sollenberger2013-05-091-7/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | incorrectly transferred." into jb-mr2-dev * commit 'e3326143c63e791863c1fd95599fb9db74fb4eed': Fix error where clips/matrices are incorrectly transferred.
| * | Fix error where clips/matrices are incorrectly transferred.Derek Sollenberger2013-05-081-7/+10
| |/ | | | | | | | | | | | | | | In these cases the caller passes in a NULL bitmap and expects it to clear the canvas state. This change preserves that behavior. bug: 8738494 Change-Id: I7ebf6a74bab3c2822849a3404de3828fec8d3084
* | Pack preloaded framework assets in a texture atlasRomain Guy2013-05-027-18/+480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the Android runtime starts, the system preloads a series of assets in the Zygote process. These assets are shared across all processes. Unfortunately, each one of these assets is later uploaded in its own OpenGL texture, once per process. This wastes memory and generates unnecessary OpenGL state changes. This CL introduces an asset server that provides an atlas to all processes. Note: bitmaps used by skia shaders are *not* sampled from the atlas. It's an uncommon use case and would require extra texture transforms in the GL shaders. WHAT IS THE ASSETS ATLAS The "assets atlas" is a single, shareable graphic buffer that contains all the system's preloaded bitmap drawables (this includes 9-patches.) The atlas is made of two distinct objects: the graphic buffer that contains the actual pixels and the map which indicates where each preloaded bitmap can be found in the atlas (essentially a pair of x and y coordinates.) HOW IS THE ASSETS ATLAS GENERATED Because we need to support a wide variety of devices and because it is easy to change the list of preloaded drawables, the atlas is generated at runtime, during the startup phase of the system process. There are several steps that lead to the atlas generation: 1. If the device is booting for the first time, or if the device was updated, we need to find the best atlas configuration. To do so, the atlas service tries a number of width, height and algorithm variations that allows us to pack as many assets as possible while using as little memory as possible. Once a best configuration is found, it gets written to disk in /data/system/framework_atlas 2. Given a best configuration (algorithm variant, dimensions and number of bitmaps that can be packed in the atlas), the atlas service packs all the preloaded bitmaps into a single graphic buffer object. 3. The packing is done using Skia in a temporary native bitmap. The Skia bitmap is then copied into the graphic buffer using OpenGL ES to benefit from texture swizzling. HOW PROCESSES USE THE ATLAS Whenever a process' hardware renderer initializes its EGL context, it queries the atlas service for the graphic buffer and the map. It is important to remember that both the context and the map will be valid for the lifetime of the hardware renderer (if the system process goes down, all apps get killed as well.) Every time the hardware renderer needs to render a bitmap, it first checks whether the bitmap can be found in the assets atlas. When the bitmap is part of the atlas, texture coordinates are remapped appropriately before rendering. Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
* | am 01e48e7d: am 22f6a60e: Merge "add docs for new attributes, including ↵Scott Main2013-04-251-0/+2
|\ \ | |/ | | | | | | | | | | account restriction for restricted profiles" into jb-mr2-dev * commit '01e48e7d1541920ece358257e4c2481936497835': add docs for new attributes, including account restriction for restricted profiles
| * add docs for new attributes, including account restriction for restricted ↵Scott Main2013-04-251-0/+2
| | | | | | | | | | | | profiles Change-Id: I737ea55bfa58562b1b384e52626e95b479759376
* | am 4a84af89: am b322f994: Merge "Add new error code for Debug Context work." ↵Stephen Hines2013-04-201-1/+16
|\ \ | |/ | | | | | | | | | | into jb-mr2-dev * commit '4a84af896c830d6ef613d1baa607d472cf865073': Add new error code for Debug Context work.
| * Merge "Add new error code for Debug Context work." into jb-mr2-devStephen Hines2013-04-201-1/+16
| |\
| | * Add new error code for Debug Context work.Stephen Hines2013-04-171-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 7343201 This error type is less severe when running under the debug context, allowing developers to use RSErrorHandler to respond to errors like out-of-bounds native accesses. Change-Id: I79c87d1956c94833546f0f638ffa1aafecae49cd
* | | am dd240d9a: am 0935f258: Merge "Updating API based on feedback" into jb-mr2-devJason Sams2013-04-193-9/+97
|\ \ \ | |/ / | | | | | | | | | * commit 'dd240d9a30578930bbf63b6bd9998e940dd16160': Updating API based on feedback
| * | Updating API based on feedbackJason Sams2013-04-193-9/+97
| |/ | | | | | | | | | | | | | | | | | | | | | | | | bug 8656887 This hides the methods used to support Camera Fixes the oversight in LaunchControl Documents some missing functions Change-Id: I5b19b65dd5ddf9917100192c180bb63d89c80679
* | am 4b87c54b: am 097ed01a: Merge "Revert GC thread changes" into jb-mr2-devJason Sams2013-04-155-99/+2
|\ \ | |/ | | | | | | * commit '4b87c54b06ed6834785ea06e066bb1e988a76973': Revert GC thread changes
| * Revert GC thread changesJason Sams2013-04-145-99/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not quite a straight revery, some manual edits were necessary. The original CL didn't undergo sufficient design review or testing. Revert until the regressions can be sorted out. Bug 8585185 This reverts commit 6dacf8355a0692b52c49f603f43317772cb36175 This reverts commit f8c033db1edf36a0ab09568c3142054f0be2d1a1 Change-Id: Ie7215bdf881332e822603547e92f810f595077fc
* | am c4294ed2: am 330a9fe3: Merge "Unhide new RS APIs." into jb-mr2-devJason Sams2013-04-143-5/+32
|\ \ | |/ | | | | | | * commit 'c4294ed2f1de5c89b5e283942e0d5f8cd8822bfb': Unhide new RS APIs.
| * Unhide new RS APIs.Jason Sams2013-04-143-5/+32
| | | | | | | | | | | | | | | | This exposes the fast path handling of YUV data. bug 8566866 Change-Id: Iaa3700100db61dd51d16d80ea8ae22f2dcc41bb0
* | am 00c4c670: am 301e95f2: Merge "Add a little more resource load tracing." ↵Dianne Hackborn2013-04-121-5/+21
|\ \ | |/ | | | | | | | | | | into jb-mr2-dev * commit '00c4c67069b9d13005ae072b8744c728aa73f99a': Add a little more resource load tracing.
| * Add a little more resource load tracing.Dianne Hackborn2013-04-121-5/+21
| | | | | | | | Change-Id: Id797adb67ab411d5b1a1c223863d3bb4655d10b1
* | am f151a541: am d6b8a035: Merge "Add support for synchronous get()." into ↵Tim Murray2013-04-125-7/+360
|\ \ | |/ | | | | | | | | | | jb-mr2-dev * commit 'f151a5411eb6afd104daac10b3e43f5e3a60c61d': Add support for synchronous get().
| * Merge "Add support for synchronous get()." into jb-mr2-devTim Murray2013-04-125-7/+360
| |\
| | * Add support for synchronous get().Tim Murray2013-04-115-7/+360
| | | | | | | | | | | | | | | | | | bug 8599910 Change-Id: I0e7c52350cc1abb14a5ed59bb92e8e0346209d53
* | | am 5c18ff0f: am 869d2735: Merge "Fix issues with GC thread." into jb-mr2-devTim Murray2013-04-121-15/+29
|\ \ \ | |/ / | | | | | | | | | * commit '5c18ff0f2b9eab8481acfe13603e253e9c16fb32': Fix issues with GC thread.