95648b8a590995e57948ff2fd57d234bdbf30be0 |
|
14-Apr-2017 |
Romain Guy <romainguy@google.com> |
Add BitmapFactory.Options.inColorSpace This allows applications to load bitmap in a preferred target color space, similar to inPreferredConfig for configurations. This change also applies recent changes made to BitmapFactory to BitmapRegionDecoder: support for outColorSpace, inColorSpace and outConfig. Bug: 32984164, 36905374 Test: CtsGraphicsTestCase (BitmapColorSpaceTest/BitmapRegionDecoderTest) Change-Id: I4eded9190d1aa9c7f3033f9bb78a6854cc48a3ef
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
9fbb0b5ab321d86efbc7fa8774052bfb34de9557 |
|
23-Nov-2016 |
sergeyv <sergeyv@google.com> |
Prohibit Config.HARDWARE in factory methods, that create mutable bitmaps Test: android.cts.graphics.BitmapTest#testCreateMutableBitmapWithHardwareConfig bug:30999911 Change-Id: I7cd4e2625563b6659613ccd180a57c56dcf7c2b1
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
b091d47a2e31a30581aa210419ff09bcc8715cdf |
|
08-Jan-2014 |
Ashok Bhat <ashok.bhat@arm.com> |
AArch64: Use long for pointers in BitmapRegionDecoder For storing pointers, long is used in BitmapRegionDecoder class, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) In addition, Graphics.cpp has been changed to work with modified BitmapRegionDecoder. Change-Id: Id54087dd3bfb29577e8b762e70946793369dc701 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
321bc46b3c885a806f2e7e29db8212f7ea6c8670 |
|
25-Sep-2013 |
Leon Scroggins III <scroggo@google.com> |
Update docs to state that mark is no longer called. BUG:6493544 Change-Id: I97a4d90ce2efcd12f8f1cc5b545f822f8e5a5ab0
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
ca32021b43f326af7d3f4ae041f8db297f98a518 |
|
20-Aug-2013 |
Leon Scroggins III <scroggo@google.com> |
Replace stream wrap-function w/ more specific ones 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
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
cd77583ed336d10c5625933a565dcadf51705c61 |
|
21-Sep-2012 |
Derek Sollenberger <djsollen@google.com> |
Ensure that the decoder is thread-safe. This prevents issues where one thread recycles the decoder while another thread is in the process of checking the decoder's status or in the process of decoding a region. bug: 6880937 Change-Id: I7f755bf2149d03594e528ca79c536713b1447a55
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
3bbcbcd5f908cef5c0bf7078c3352185f1ff6ddc |
|
15-May-2012 |
Owen Lin <owenlin@google.com> |
Release the constraint on the requested version. Allowing to request a region that partially outsides the image. bug: 5884845 Change-Id: I32344930ab9e2a7f22a706914babb165843e8de7
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
96d3b5e38301f5d4eff01de8730b6021eb167af9 |
|
12-Jan-2011 |
Wei-Ta Chen <weita@google.com> |
Correct the API comments. BitmapRegionDecoder supports PNG as well. Change-Id: I5f1b95c20c3ae87738f9814cfc16d6a4c5af2bf5
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
6b849e2123be98eb2a1a25b8abf0b13a279ce952 |
|
07-Sep-2010 |
Wei-Ta Chen <weita@google.com> |
Unhide BitmapRegionDecoder. 1. Rename LargeBitmap to BitmapRegionDecoder 2. Move the instantiations of BitmapRegionDecoder out of BitmapFactory. 3. Remove the use of MemoryFile in BitmapRegionDecoder, since MemoryFile's API had been modified in master. Otherwise, the change will break the master build. 4. Move AssetStreamAdaptor, AutoFDSeek and nullObjectReturn to Utils.h because BitmapFactory.cpp and BitmapRegionDecoder.cpp both need to use these utility functions. Most of the modifications, except for (2) and (3), were reviewed in https://android-git.corp.google.com/g/#change,64716 . However, that change broke the master build due to (3) and was reverted eventually. So, instead of withdrawing this change and waiting for that change to be checked in again, I merge the two changes into one. Change-Id: I2202c0fbbbd6d6676bbd9637e690023ea4099c40
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
340ce75b446f6a6afc12b0582be3fc34ac3a5364 |
|
08-Sep-2010 |
Wei-Ta Chen <weita@google.com> |
Revert "Rename LargeBitmap to BitmapRegionDecoder for having a better API." This reverts commit 50ba3d2c09a9131f3578d271adf2bc8258ca1742.
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|
50ba3d2c09a9131f3578d271adf2bc8258ca1742 |
|
07-Sep-2010 |
Wei-Ta Chen <weita@google.com> |
Rename LargeBitmap to BitmapRegionDecoder for having a better API. Move AssetStreamAdaptor, AutoFDSeek and nullObjectReturn to Utils.h because BitmapFactory.cpp and BitmapRegionDecoder.cpp both need to use these utility functions. Change-Id: I3e60c7fe4abd0289e1384e69a08fd20fe6fb0e10
/frameworks/base/graphics/java/android/graphics/BitmapRegionDecoder.java
|