summaryrefslogtreecommitdiffstats
path: root/graphics
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Surface: Change OutOfResourcesException to be a runtime exception" ↵Igor Murashkin2013-09-111-5/+16
|\ | | | | | | into klp-dev
| * Surface: Change OutOfResourcesException to be a runtime exceptionIgor Murashkin2013-09-091-5/+16
| | | | | | | | | | | | | | | | | | - Deprecates SurfaceTexture.OutOfResourcesException, it wasn't used - Make all JNI code throw only Surface.OutOfResourcesException - Get rid of redundant SurfaceControl.OutOfResourcesException Bug: 10566539 Change-Id: I58126260771b9ccff6a69c672ce7719b9f98138d
* | Merge "Remove FD optimization case for decodeStream" into klp-devJohn Reck2013-09-101-15/+1
|\ \
| * | Remove FD optimization case for decodeStreamJohn Reck2013-09-091-15/+1
| |/ | | | | | | | | | | | | | | | | | | Bug: 10677727 The problem is that the FileInputStream may be wrapping a pipe or AssetFileDescriptor which fails if handed to decodeFileDescriptor. The problem is that AFDs can start in the middle of a file, whereas decodeFileDescriptor assumes it can mmap() the FD and start at the beginning. Change-Id: I98a3c5f789865145e25a99b32d205e290808c1cf
* | Merge "Don't set Allocation mSize when we have no Type." into klp-devStephen Hines2013-09-101-1/+4
|\ \ | |/ |/|
| * Don't set Allocation mSize when we have no Type.Stephen Hines2013-09-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | Bug: 10667740 A3D creates Allocations before knowing the underlying Type (and thus size). Moving the mSize calculation to be conditional for concrete Allocations eliminates the bug. In the future, we could let A3D dynamically update the Allocation size if it is necessary to improve heap behavior. Change-Id: I520246806b6ead0387a1a41372dade1a6e7c2271
* | Merge "Add flags word to initialization." into klp-devTim Murray2013-09-091-1/+1
|\ \
| * | Add flags word to initialization.Tim Murray2013-09-091-1/+1
| | | | | | | | | | | | | | | | | | bug 10427951 Change-Id: I1356b9b96315ead44aa3898de5604d75f9bb8be5
* | | Merge "Fix pixel test" into klp-devAndy McFadden2013-09-091-9/+10
|\ \ \ | |/ / |/| |
| * | Fix pixel testAndy McFadden2013-09-091-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | A deprecated format was dropped entirely. Bug 10666734 Change-Id: I6b64bd27db8965a1696d72387232b7de4bce6574
* | | Update doc for BitmapFactory.Options to include BitmapRegionDecoderChris Craik2013-09-061-12/+29
|/ / | | | | | | | | bug:9987022 Change-Id: I1a4e187e1c35a7758b70f69a0a25914597920e8f
* | Change build version from KEY_LIME_PIE to KITKATChet Haase2013-09-052-5/+5
| | | | | | | | | | | | Issue #10631619 Change build version to KitKat Change-Id: I6ad13f6169ad74204078d36929479998b498ad8b
* | Merge "Add YUV element convenience function." into klp-devTim Murray2013-09-053-3/+12
|\ \ | |/ |/|
| * Add YUV element convenience function.Tim Murray2013-09-043-3/+12
| | | | | | | | Change-Id: Ie67dfba6a4c4f1913875ad9817c53e45d56809ae
* | Merge "Prevent NPE when cloning gradients Bug #10436856" into klp-devRomain Guy2013-09-033-5/+6
|\ \
| * | Prevent NPE when cloning gradientsRomain Guy2013-09-033-5/+6
| | | | | | | | | | | | | | | | | | Bug #10436856 Change-Id: I98cbce941a06842112b8caa3753a3fa32b227da9
* | | Merge "Update Bitmap.Config.ARGB_4444 documentation Bug #10510122" into klp-devRomain Guy2013-09-032-1/+5
|\ \ \ | |/ / | | / | |/ |/|
| * Update Bitmap.Config.ARGB_4444 documentationRomain Guy2013-09-032-1/+5
| | | | | | | | | | | | | | | | Bug #10510122 ARGB_4444 is deprecated and always replaced with ARGB_8888. Change-Id: I0da96216af701a7df00ad35913066fbfa997d790
* | Cleanup API typoJason Sams2013-08-292-2/+6
| | | | | | | | | | | | bug 10548782 Change-Id: I3654b7d1f8ea10eb51006804248cc2a7d20eabb0
* | Merge "Unhide USAGE_IO_INPUT functions" into klp-devJason Sams2013-08-291-9/+5
|\ \
| * | Unhide USAGE_IO_INPUT functionsJason Sams2013-08-291-9/+5
| |/ | | | | | | Change-Id: I9c1a7e5d65adee133b99b9a94729ab0b3d5a097f
* | Merge "Replace stream wrap-function w/ more specific ones" into klp-devLeon Scroggins III2013-08-292-37/+44
|\ \
| * | Replace stream wrap-function w/ more specific onesLeon Scroggins III2013-08-272-37/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current stream wrapper returns a potentially incorrect value for a call to getLength(), is typically copied into another stream (not always in the same way), and doesn't always take advantage of its underlying data (like when it is an Asset). The overall goal of this CL is to provide the caller with something that is ready to use, depending on what is asked for. If a copy is desired, the copy is made before being returned to the caller. core/jni/android/graphics/Bitmap.cpp: Include SkStream.h, since it is no longer included by CreateJavaOutputStreamAdaptor's header file. core/jni/android/graphics/BitmapFactory.cpp: Pass an SkStreamRewindable to decoding functions, as Skia decoders will be updated to only take an SkStreamRewindable (which makes more sense because they require rewinding). Call the more specific GetRewindableStream to get a rewindable stream. Remove copyAssetToStream which has been moved to Utils. In nativeDecodeAsset, pass forcePurgeable as allowPurgeable in doDecode. Technically the old code worked, but it checked the BitmapOptions again. Remove getFDSize, which is no longer used. core/jni/android/graphics/BitmapRegionDecoder.cpp: Remove redundant buildSkMemoryStream. nativeNewInstanceFromStream now calls CopyJavaInputStream, which handles the copy. Copy the Asset directly, using common code, rather than creating an AssetStreamAdaptor to copy. core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp: core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h: Provide new interfaces to access data from a Java InputStream. The new interfaces are more specific about what type of stream is desired. Use forward declarations where possible. Remove doSize, which gives a misleading answer to the question of how long the entire stream is. TODO: Only call FindClass etc once. core/jni/android/graphics/Movie.cpp: Check for an asset stream, and use it if possible. Then call GetRewindableStream if there is not an asset. Remove the memory leak. Call DeleteLocalRef to delete the allocated memory. core/jni/android/graphics/Picture.cpp: Call the new interface. core/jni/android/graphics/Utils.cpp: core/jni/android/graphics/Utils.h: Make AssetStreamAdaptor inherit from SkStreamRewindable so it can be passed to Skia decoding functions once they require it. Add CopyAssetToStream (moved from BitmapFactory.cpp) so it can be used by multiple files. graphics/java/android/graphics/BitmapFactory.java: Remove the call to mark, which is now done natively. Remove the BufferedInputStream. Mark/reset is now handled by native code. Allow decodeStream to handle a FileInputStream by using the FileDescriptor, if it is seekable. In decodeFileDescriptor, call nativeDecodeStream instead of decodeStream so this new functionality will not loop. Call setDensityFromOptions in decodeFileDescriptor. graphics/java/android/graphics/BitmapRegionDecoder.java: Remove the BufferedInputStream. Mark/reset is now handled by native code. TODO: ADD TESTS! Requires https://googleplex-android-review.googlesource.com/#/c/344317/ BUG=https://b.corp.google.com/issue?id=8432093 Change-Id: I4419b70b3482325c98ecc673dbfc4613f1b18581
* | | Set alpha channel correctly when recomputing gradientAlan Viverette2013-08-281-9/+10
|/ / | | | | | | | | | | | | | | | | | | The alpha channel is applied by modulateAlpha(). Setting it to mAlpha in ensureValidRect() locked the maximum alpha channel to whatever value was set before layout. Setting it to BLACK ensures it can be modulated later. BUG: 10514848 Change-Id: If7a824410a66f1e9b648e20ee627bdf99a42ae78
* | Merge "Add garbage collection hooks" into klp-devTim Murray2013-08-232-0/+27
|\ \ | |/ |/|
| * Add garbage collection hooksTim Murray2013-08-232-0/+27
| | | | | | | | | | | | bug 10428172 Change-Id: I6365aa58bbc99aa134e1f261a5819e07a7d70fb0
* | Add inPremutiplied option to BitmapFactory.Options, functionality in BitmapChris Craik2013-08-203-42/+105
| | | | | | | | | | | | bug:2248948 Change-Id: I8fdd649332667598504a1076d5a447572bd53086
* | Merge "Renderscript: Allow YUV_420_888 as a YUV type." into klp-devEino-Ville Talvala2013-08-211-6/+10
|\ \ | |/ |/|
| * Renderscript: Allow YUV_420_888 as a YUV type.Eino-Ville Talvala2013-08-141-6/+10
| | | | | | | | Change-Id: I1ed731103a49a814f9a049ecd01be98261b6d06b
* | Remove comment that's only relevant for the underlying SkMatrix. Matrix has ↵Mike Klein2013-08-141-3/+0
| | | | | | | | | | | | | | | | constructors. bug: 8470620 Change-Id: I00063dc03f752955c27c73e9c59b0496a1795924
* | Camera.applyToCanvas() now works with hardware canvasesRomain Guy2013-08-131-1/+9
|/ | | | Change-Id: I7f06b2a74ccc1941d51e12a0417028e094c1b669
* Update Bitmap.createBitmap() documentationRomain Guy2013-08-121-1/+6
| | | | Change-Id: Ic2efed6cc03c8b2c2d9810b7ab645b0b98b91e1f
* Merge "Fix bug #10205316 CTS (KLP): android.graphics tests are failing" into ↵Fabrice Di Meglio2013-08-091-0/+2
|\ | | | | | | klp-dev
| * Fix bug #10205316 CTS (KLP): android.graphics tests are failingFabrice Di Meglio2013-08-081-0/+2
| | | | | | | | | | | | | | | | - fix null Shader case during copy Related to https://googleplex-android-review.googlesource.com/#/c/336815/7 Change-Id: I920d6bb181ddb92d6f771e5060fd1858430e71ad
* | Remove an unnecessary allocationRomain Guy2013-08-091-3/+7
| | | | | | | | | | | | Also remove dead code from OpenGLRenderer.cpp Change-Id: I7eb54ca19e77ee3c32f1fe9513a031e6b2e115cf (cherry picked from commit 5c7d5ab878b26f855175a3305a14ac12fcacf25e)
* | Refactor Canvas.drawPicture() to delegate to PictureJonathan Dixon2013-08-081-3/+3
|/ | | | | | | | | Bug: 9814370 To allow WebView.capturePicture() to return a subclass, we need to ensure the subclass is always consulted when being drawn into a canvas. Change-Id: Ia0357f95b6fafb3ac81e6bcfaef05739e619897a
* Clearly separate consumer and producer interfacesMathias Agopian2013-08-061-0/+1
| | | | | Bug: 9265647 Change-Id: Ic68e91788d0a05251e1d2fb9f9d4de403c7099bf
* am eab8e18d: am 8a736129: Merge "If graphics wants ASCII lowercasing, it ↵Elliott Hughes2013-08-051-2/+2
|\ | | | | | | | | | | | | needs to ask for it." * commit 'eab8e18d8f6f34a9d35fbb120148956789ad48a2': If graphics wants ASCII lowercasing, it needs to ask for it.
| * am 8a736129: Merge "If graphics wants ASCII lowercasing, it needs to ask for ↵Elliott Hughes2013-08-051-2/+2
| |\ | | | | | | | | | | | | | | | | | | it." * commit '8a736129faa9e41b5f33c42bbeae1f68cb42d38f': If graphics wants ASCII lowercasing, it needs to ask for it.
| | * If graphics wants ASCII lowercasing, it needs to ask for it.Elliott Hughes2013-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html Bug: https://code.google.com/p/android/issues/detail?id=58359 Change-Id: I13c106985302335dbb15bb9176d35ec6b4546d4e
* | | Merge "graphics: Update ImageFormat#YUV_420_888 javadoc"Igor Murashkin2013-08-021-2/+18
|\ \ \
| * | | graphics: Update ImageFormat#YUV_420_888 javadocIgor Murashkin2013-08-021-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make it clear that the Y-plane is not interleaved for YUV_420_888 * Make it clear that the U/V plane have the same stride * Make it clear what the order of Y/U/V planes is Change-Id: Id85d7c68e84382149dbf0e8b4e965ba2988326fe
* | | | Merge "Changes needed to support Skia at r10377."Derek Sollenberger2013-08-021-1/+0
|\ \ \ \
| * | | | Changes needed to support Skia at r10377.Derek Sollenberger2013-08-011-1/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: Id1e1c8c5938ee1a33c6fa3caabd2c28e89243eb4
* | | | | Add automatic Drawable mirroring capability when in RTL layout directionFabrice Di Meglio2013-08-016-7/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - default value is "no mirroring" - introduce android:autoMirrored as a new attribute for Drawable, BitmapDrawable, LayerDrawable, StateListDrawable and NinePatchDrawable - setting android:autoMirrored="true" means that the drawable will be mirrored when the layout direction is RTL (right-to-left) - also fix an issue with ImageView drawable layout direction not updated correctly when RTL properties were changed See bug #7034321 Need Drawable RTL support Change-Id: If595ee5106c786f38e786d3a032e182f784a9d97
* | | | | Merge "Fix Paint Shader copy"Fabrice Di Meglio2013-08-017-4/+241
|\ \ \ \ \
| * | | | | Fix Paint Shader copyFabrice Di Meglio2013-08-017-4/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Paint.setClassVariablesFrom(Paint paint) was using the same Shader for the copy as the initial Paint. Make sure that we are using a copy. - implement a copy() API for shaders See bug #7034321 Need Drawable RTL support Change-Id: I4b9cee386edc72ad670723266333b85f4d2b0ab8
* | | | | | Merge "Add missing alpha channel to built-in colors"Romain Guy2013-08-011-9/+9
|\ \ \ \ \ \
| * | | | | | Add missing alpha channel to built-in colorsRomain Guy2013-08-011-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I911c17b623513b2715668d0f91604b28c32a969a
* | | | | | | Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)Victoria Lease2013-07-311-1/+9
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite a few things going on in this commit: - Enable bitmap strikes by default in Paint objects. The SkPaint parameter that enables bitmap strikes was not previously included in DEFAULT_PAINT_FLAGS. This effectively disabled bitmap fonts. Oops! It's for the best, though, as additional work was needed in Skia to make bitmap fonts work anyway. - Complain if TEXTURE_BORDER_SIZE is not 1. Our glyph cache code does not currently handle any value other than 1 here, including zero. I've added a little C preprocessor check to prevent future engineers (including especially future-me) from thinking that they can change this value without updating the related code. - Add GL_RGBA support to hwui's FontRenderer and friends This also happened to involve some refactoring for convenience and cleanliness. Bug: 9577689 Change-Id: I0abd1e5a0d6623106247fb6421787e2c2f2ea19c