We updated the API of SkShader (changed in
https://codereview.chromium.org/1553743002) but the function still does
the same thing. As such, undo the changes in
f4eca05cdc19c095cdc0a9140d512737533a87c5 which call the method
differently.
BUG:26549769
This partially reverts commit f4eca05cdc19c095cdc0a9140d512737533a87c5.
Change-Id: I52f2fab7da748cfe351e2fa27ade24aa572176a7
The original intention for forcing ninepatches to be encoded as
RGBA (with alpha) was to avoid the possibility of the decoder
producing 565 output.
565 output is bad for ninepatches because dithering tiny images
that we intend to scale later leads to bad results. I would
argue that, since the new BitmapFactory does not dither, we might
now be ok to allow 565 decodes for ninepatches. However, we
will maintain the old behavior by disabling 565 decodes for
ninepatch.
There are two changes to PNG encodings:
(1) Allows ninepatch images to be encoded in any mode. Forcing
them to RGBA makes things awkward for the decoder. Currently,
BitmapFactory's png decoder checks every pixel for alpha.
That way, RGBA images that are actually opaque can be marked
as opaque, in order to optimize drawing. We want to remove
this complexity from the decoder.
(2) Make sure ninepatch chunks are stored in the png header. That
way we know immediately that the png is a ninepatch, and can
refuse to decode to 565 (if we feel this is best).
Change-Id: I724f5dbefb1be7b412f9b362dff83cbc0603f0bf
This is 2nd attempt of I277a08b5a17d45c3edb8fb597fdf6786bbe9f83b
The language code to BCP47 conversion is done by Minikin.
Also this CL addresses the signature changes by
I8df992a6851021903478972601a9a5c9424b100c
Bug: 26168983
Change-Id: Id106e9bb5c3eaa6652b44a1735f427accaca1368
This changes the documentation for inPreferQualityOverSpeed,
inDither, and requestCancelDecode().
These changes are a result of modifying the backends of
BitmapFactory and BitmapRegionDecoder to be faster, higher quality,
and to use standard libraries.
BUG:26266063
BUG:25556965
Change-Id: I9008fd276a38c737e242bcc6930ffe4e36d9fd1d
Check for OOM after calling encodedFormatToString().
Do not correct Alpha8 to Gray8. This will be handled in Skia.
Change-Id: Id573548608fbd5fbeef2898844480d8f8f73e1d0
The language code to BCP47 conversion is done by Minikin.
Also this CL addresses the signature changes by
I8df992a6851021903478972601a9a5c9424b100c
Bug: 26168983
Change-Id: I277a08b5a17d45c3edb8fb597fdf6786bbe9f83b
SkImageDecoder is being phased out. The SkImageDecoder::Peeker has been
repurposed as SkPngChunkReader, which is shared by SkImageDecoder and
SkCodec (SkImageDecoder's replacement). Make NinePatchPeeker inherit
from the new class, and make its SkImageDecoder mHost optional, so we
can easily switch to SkCodec.
Change-Id: I74eeb909d1a4f4fe928d079857f92c142351b496
ttcIndex is used for specifying index of the TrueType Collection.
No user visible change is expected with this CL.
BUG: 10861108
Change-Id: I76a1c890164bb55a7ece7b9c7db2ce2bac3f8b89
Setting the LocaleList to the native Paint object is not a lightweight
operation since it needs to propagate a string object to the native code
which then needs to parse it for making minikin language list.
To avoid performance regressions, cache the minikin language ID in
android.graphics.Paint and send the LocaleList with cached ID
instead of a string the next time native code is called.
BUG: 25122318
Change-Id: Ib5ce8bcff8a1c0a2b1a1c3d1868ea8be5a0e642f
With this CL, Paint.hasGlyph returns true if the typeface supports
the passed code point and variation selector pair.
Bug: 11256006
Change-Id: If29cd0c5942dc78bd862804106e29539bdeee569
This is temporary, we are planning to delete this class.
Renaming will allow us to have an SkBitmapRegionDecoder class
in Skia.
Change-Id: I8d24d481d4e8cf782f578fa6deb6e3245c998a37
Also corrects some code under development behind the HWUI_NEW_OPS flags
to match the updated Skia API.
Include external/skia/include/private
use SrcConstraint for drawBitmapRect
clean up to allow removal of flags for SCALAR_DIV and IMAGEINFO_FIELDS
don't call DEPRECATED getDevice()
update to newer API for drawBitmapRect
asABitmap is deprecated, used isABitmap
previous-Change-Id: I12208855a95948897077b1c1549eb35416cc801e
previous-Change-Id: I5044f0f61315fe48c60d7af5e261a7d0ed574f56
previous-Change-Id: Ic34a3ba77b3f9e091fa7aaba75018a307abacdab
previous-Change-Id: I79f8dd779920565d1204f7fe67b3286b1bbf4e9b
previous-Change-Id: Ic04d1f8274f6a862ea00f8d241363cf31f5ec1ec
previous-Change-Id: I9e4ae257a1976c74302b6a73f17405174ae58cec
previous-Change-Id: I85de3462ad1e4877784df38edc4bcd0acbd24e5e
Change-Id: Ide8e2f669e91a13c32521af3a16efdaa085c81d0
Include external/skia/include/private
use SrcConstraint for drawBitmapRect
clean up to allow removal of flags for SCALAR_DIV and IMAGEINFO_FIELDS
don't call DEPRECATED getDevice()
update to newer API for drawBitmapRect
asABitmap is deprecated, used isABitmap
Change-Id: I519f54f97321a7a365ea81a3b78cb03b9bdca021
previous-Change-Id: I12208855a95948897077b1c1549eb35416cc801e
previous-Change-Id: I5044f0f61315fe48c60d7af5e261a7d0ed574f56
previous-Change-Id: Ic34a3ba77b3f9e091fa7aaba75018a307abacdab
previous-Change-Id: I79f8dd779920565d1204f7fe67b3286b1bbf4e9b
previous-Change-Id: Ic04d1f8274f6a862ea00f8d241363cf31f5ec1ec
previous-Change-Id: I9e4ae257a1976c74302b6a73f17405174ae58cec
Also, compute LocaleList's string representation at construction.
This is to further push the cost of doing costly operations related
to LocaleLists to construction time.
Change-Id: Ia55b8ce66b1088ff54cb42eb1e11149b5bd10f17
MinikinSkiaFont::GetGlyph is no longer used and MinikinFont:GetGlyph
interface is removed by I13398503841ac06f930b04815017d4b33338efa1.
No behavior chnages are expected with this CL.
Change-Id: I8496aad446c6809f74a5effc7ef1baa25c4381b8
GLTrace is defunct, it does not support newer GL features, breaks
security requirements, and has no supported tooling now that Eclipse
is at end of life.
Bug 22329852
Change-Id: I64c58464f8c2c7ae6125f5d5c7884e3fd34d68ea
Skia no longer uses these macros internally. They're now only
provided for backwards compatibility, so remove their uses within
Android.
See thread on skia-discuss:
https://groups.google.com/d/msg/skia-discuss/l9TSgpYCHpU/sNpA1y8YCQAJ
Change-Id: Ia7313f5bbdf4d2d9fb4a10fc5bdc1572e6b84f6c
Now that static_assert is allowed, there is no need to use a non-
standard compile time assertion.
Change-Id: I0b294efcf494983f8241e9d5a2c476e2f2a9fff0
There isn't any good reason for Android code to be using SkNEW,
and in some places it is potentially an issue. Also, SkNEW really
should be considered private to Skia at this point.
Change-Id: I35c675bd2c45b7a65c526508c202a30e30859491