BUG:13191516
Original CLs below:
In nativeDecodeFileDescriptor, use fdopen.
Instead of attempting to mmap the entire file, create an
SkFILEStream from a FILE.
BUG:11669944
BUG:11028218
Cherry-pick from: If67da91484acc79f9f3dde6d05201409c0c75e41
-------------------------------------------------------------------------
Decode file descriptor from the correct offset.
Fix a few bugs in nativeDecodeFileDescriptor:
1. Restore the FD's offset when exiting the function.
2. Copy the data when potentially using an SkImageRef.
The old behavior would have continued to modify the
file descriptor's offset each time a new decode was
required. The copy ensures that the file descriptor
remains unchanged.
3. Buffer the file stream.
Prior to this change, if the image was not a PNG,
the stream would be rewound to the beginning of the
file, even if the file descriptor was passed in with
an offset. Thanks to the buffer, the stream is only
rewound to the original offset.
Depends on https://googleplex-android-review.googlesource.com/#/c/415821/1
in external/skia
BUG:12807677
BUG:12895876
Cherry-pick from: I38b8cf5d210dbbc0107e6562e3884867de57fc4b
(These CLs are already in master.)
Bug: 13246311
This cherry-picks 7 CLs:
-----------------------------------------------------------------------
Remove calls to deprecated SkBitmap::setIsOpaque()
setIsOpaque() has been removed from ToT Skia.
Update setters for mIsPremultiplied and hasAlpha to take the
other into consideration.
cherry-pick from: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a
-----------------------------------------------------------------------
Merge AssetStream with AssetStreamAdaptor.
Add enums to the constructor for AssetStreamAdaptor to choose the
different behaviors used by the (former) two different classes.
The old clients of AssetStream now get the following features of
AssetStreamAdaptor
- Debugging statements on error.
- The stream is an SkStreamRewindable.
- getLength() returns the correct value, and the old way of getting
the length (read(NULL, 0)) is no longer implemented, since it is
no longer used.
- isAtEnd() returns the correct value. ToT Skia makes it pure virtual,
so some implementation is necessary.
cherry-pick from: I2a5395914e4f53830aaefee396556459083a1c56
-----------------------------------------------------------------------
Deprecate Android-specific SkPaint functions.
The following functions were problematic:
const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*);
const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*);
const void* findImage(const SkGlyph&, const SkMatrix*);
Replacing them with calls through SkGlyphCache solved a nasty crash
bug, so they have all been deprecated.
Bug: 11968757
cherry-pick from: Id746315d41aec5b211b78b172a883c2061130f08
-----------------------------------------------------------------------
pass SkGlyphCache into updateGlyphCache()
Doing so prevents us from double-locking the glyph cache, thereby
effectively locking ourselves out of reusing work that we'd just done.
Bug: 11968757
cherry-pick from: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89
-----------------------------------------------------------------------
Updates to the Skia API needed to merge the WebView m33 version of Skia.
cherry-pick from: I0f63b53f2aae58871413b132742fc84138f069a3
Bugfix for screenshots (recent apps) due to incorrect rowBytes computation
bug: 12915192
cherry-pick from: I4d5fe2a2f75baf66099e0970fb646686a1992714
-----------------------------------------------------------------------
Fix bug in AndroidPixelRef where we did not store the correct imageInfo for a recycled bitmap.
cherry-pick from: I882483b78886e2f19fa4e43a86e69f5a82b3b7e5
-----------------------------------------------------------------------
Change-Id: Ie2b731a9f0795802418cfecddb4b684c92c64d33
Conflicts:
core/jni/android/graphics/Bitmap.cpp
core/jni/android/graphics/Graphics.cpp
core/jni/android/graphics/Typeface.cpp
graphics/java/android/graphics/Bitmap.java
Passing size_t is problematic on 64 bit platforms where
it's 8 bytes in size. Conversion to int32_t is safe because
the size argument is always clamped to fCapacity, which is
4 bytes wide.
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Change-Id: I58558561a4f56451485f1a5fc6cdeda677247071
Missed some test(s), reverting to fix build
This reverts commit ef09d8cf946443e7f4ac4541f843368ac4338c59.
Change-Id: Ifee6c694e5f4b962d03dee200ccbf8dc9662e666
It is important that the char buffers for options do
not go out of scope as the mOptions.add() does not copy
the buffer. This moves all the buffers to the top
level scope of the function to prevent accidental
overwriting when they go out of scope.
Bug: 13448497
Change-Id: I5a97ddd32ff34f237915927906e1e1f833ff036e
This was brought back by a bad merge conflict resolution
in change 0efbd9a463c848118c7685f4bfc8765a82caa761.
Change-Id: I0c7cbe8ee396293619eabf4d0a3c2f06c76bdd6e
New write method with data in ByteBuffer. Allows blocking and
non-blocking write.
If the ByteBuffer is not direct, the implementation uses the
existing implementation with a byte array.
Bug 7919023
Change-Id: I6935e3e05783d7d7672614b194941a87abbb50cf
Bug: 13360343
Change DisplayList to be more forgiving with weaker lifecycle
requirements. Is more self-managed with a strong reference
to the renderer it needs
Also fix naming mismatch
Change-Id: I5c89453a72a52954f6f959f0846199705dbb6476
The Res_png_9patch struct had several pointer members
whose size differed between 32 and 64 bit platforms.
These members have been replaced by uint32_t offsets
to serialized data. The serialized form for 9patches
places a Res_png_9patch object at the beginning of
serialized data, followed by int32_t arrays of xDivs,
yDivs and colors.
Note that these offsets are not strictly required,
since they can be computed from the values of numXDivs,
numYDivs & numColors, however they are called in tight
loops so having them computed once is a beneficial.
This change also removed the unused patch_equals function
from aapt's Image.cpp.
Change-Id: I3b9ac8ae5c05510d41377cae4dff1c69b40c2531
This is a change to add args to some of the profiler related
functions, including installd commands.
Also read properties and set command line options for the runtime
profiling parameters.
Changed calls to isDexOptNeeded() to isDexOptNeededInternal(). This
needs additional arguments passed for profiles.
Bug: 12877748
Change-Id: I1a426c9309d760bac0cf92daa298defee62287c1
Conflicts:
core/jni/AndroidRuntime.cpp