1084 Commits

Author SHA1 Message Date
Derek Sollenberger
c6418c04ab Merge "Cleanup addtional files that were missed in the first purge of AvoidXfermode" into nyc-dev 2016-04-04 20:26:28 +00:00
Derek Sollenberger
93ab281e1c Cleanup addtional files that were missed in the first purge of AvoidXfermode
bug: 14650725
Change-Id: Ib7fb6a31705fb60535ecf2017db321c15e3d06cc
2016-04-04 14:49:51 -04:00
John Reck
2aaf681dc0 Merge "Remove warning" into nyc-dev 2016-04-01 16:09:22 +00:00
Keisuke Kuroyanagi
aea43f8414 Merge "Fix: doRunAdvance returns wrong value when offset == count." into nyc-dev 2016-04-01 05:27:38 +00:00
John Reck
562cfef1d5 Remove warning
Fixes: 25760687

The recommendation floating around is to ignore this even
though it's unquestionably an app bug so just remove it.

Change-Id: I7075de5d2864874d786a0aab0c945be96de172e3
2016-03-31 10:07:21 -07:00
Keisuke Kuroyanagi
b3677715e6 Fix: doRunAdvance returns wrong value when offset == count.
Bug: 27869952
Change-Id: I56278676da4c354ced4244e4b073bb0d82edf93b
2016-03-28 19:16:30 +09:00
Philip P. Moltmann
cd7c97bcf7 Merge "PDFium interface changed, hence adjust the adapter jni code." into nyc-dev 2016-03-26 18:12:59 +00:00
Derek Sollenberger
a9471b1bd6 Update pixelRef genID when reusing pixels in RecyclingClippingPixelAllocator.
When this code was refactored to support the new RegionDecoder it appears that
we dropped a call to bump the genID.  Adding it back is functionally correct
and should fix the recycling issue.

bug: 26617759
Change-Id: I966d398ca983edb40040e01345799b3cc9957fe0
2016-03-25 13:03:57 -04:00
Sergei Vasilinetc
ab852f2972 Merge "Add offset() to Path's fast-case mode" into nyc-dev 2016-03-24 05:02:02 +00:00
sergeyv
ecbcdd384c Add offset() to Path's fast-case mode
bug:22510833
Change-Id: I417ed13ff450aa7f6c72370b4c5de8e8a53a0235
2016-03-23 16:45:55 -07:00
sergeyv
bad9918391 Clean up and rename TypefaceImpl
bug:25865834
Change-Id: I77e8a627163e040a5c25865054a8a936052af367
2016-03-21 16:33:14 -07:00
sergeyv
dccca44ffd Reland: Move text logic from jni to hwui level
Initial CL: https://googleplex-android-review.git.corp.google.com/#/c/886854/

Change-Id: I9dfd85fe1d2a2c44f4360c8a29fd58d80e6f31c8
2016-03-21 15:55:46 -07:00
Sergei Vasilinetc
6847953955 Merge "Revert "Move text logic from jni to hwui level"" into nyc-dev 2016-03-21 21:06:47 +00:00
Sergei Vasilinetc
afbd0f1fef Revert "Move text logic from jni to hwui level"
This reverts commit a7f6bba1a3565c19715e878dfe7f0e01022944ff.

Change-Id: If4f36f87a85411b6128fd92d391313803ccaf9dd
2016-03-21 21:03:40 +00:00
Sergei Vasilinetc
49658d4380 Merge "Move text logic from jni to hwui level" into nyc-dev 2016-03-21 20:11:27 +00:00
Philip P. Moltmann
79bd8d48ad PDFium interface changed, hence adjust the adapter jni code.
Bug: 27564090
Change-Id: I983398a90438062ecc9c7ebc0ad325777fa8aaff
2016-03-18 09:51:40 -07:00
sergeyv
a7f6bba1a3 Move text logic from jni to hwui level
bug:25865834
Change-Id: I2d8c9c9544afcb5ce1784f732aed3e54e0eda372
2016-03-17 09:48:57 -07:00
Yujie Qin
990ea136b2 Return DNG mimeType for the case kRAW_SkEncodedFormat
Bug: 27587823
Change-Id: I0f539034a883083a30f33262edc715714f45e60d
2016-03-17 14:13:22 +01:00
Derek Sollenberger
51e7805f14 Remove all non-porterduff xfermodes from the public API
bug: 14650725
Change-Id: I3c935c32849be8762281eb3d1c86481be3fa139f
2016-03-11 09:10:27 -05:00
Anton Daubert
cb1b27b6f8 Merge "Fine scale the decoded result to match the desired sampleSize." into nyc-dev 2016-03-10 12:06:29 +00:00
Anton Daubert
4e5ec34e98 Fine scale the decoded result to match the desired sampleSize.
Bug: 27097032
Change-Id: Ie15a3116cdd6988524977e5390f6edbac224e502
2016-03-09 09:11:44 +01:00
Philip P. Moltmann
7c90661a6f Do not move PDF content as the content is already moved.
Bug: 26961589
Change-Id: I444a4164f3b98af7aeb6df6e9a0b025d20a4a93b
2016-03-03 13:20:38 -08:00
Yujie Qin
c1d7b7f71c Use SkFILEStream directly when possible
When decoding from a file descriptor, if the descriptor is seekable and
has no offset, use SkFILEStream directly instead of wrapping in an
SkFrontBufferedStream.
This will let the SkRawCodec take advantage of a seekable stream.
One can see 2x speed up for RAW cases.

Bug: 27097104
Change-Id: I369fbb3af1170c94ec7cd9bb35e8e0007dde9fd5
2016-02-29 15:49:51 +01:00
Ben Wagner
31af215b26 Merge "Use UTF32 directly in HarfBuzz<->Skia interface." into nyc-dev 2016-02-19 15:03:48 +00:00
Keisuke Kuroyanagi
f491051143 Merge "Optimize: Use measureText instead of doLayout." into nyc-dev 2016-02-18 23:19:44 +00:00
Ben Wagner
c1fa6d0deb Use UTF32 directly in HarfBuzz<->Skia interface.
This fixes a TODO to use kUTF32_TextEncoding directly. This avoids
encoding UTF32 codepoints from HarfBuzz into UTF16 to pass to Skia,
which will then re-decode to UTF32. This also removes a use of
SkUtils.h which Skia desires to move to private use.

Change-Id: I087f4216c25f7874e496920cd33e2f109530c397
2016-02-18 17:20:17 -05:00
Keisuke Kuroyanagi
4c8a526478 Optimize: Use measureText instead of doLayout.
measureText is a light weight method dedicated to measure text width.
With this CL, breakText, doRunAdvance and doOffsetForAdvance use
measureText.

Bug: 24505153

Change-Id: Ibd62de2e0fe2e196cf07472f2270cc8c6325daab
2016-02-18 11:31:56 -08:00
Derek Sollenberger
fd00820ca3 Update Region parcelling to use SkRegion::Iter
Bug: 26593930
Change-Id: Ie673c776ed7e1c327ca0f3196900fbb229c2a936
2016-02-17 12:22:20 -05:00
Leon Scroggins
8e552f2eae Merge "use std factory for compose-shader" into nyc-dev 2016-02-16 14:51:36 +00:00
Ben Wagner
fb95699364 Deduplicate font file mappings.
With ttc and gx variation fonts, it is now possible and common that a
number of fonts will use the same font file for data but with different
parameters. In the current code each font will map the font file data,
taking up an unecessary amount of virtual address space and is
inefficient with respect to memory management (like the tlb). This CL
deduplicates these file mappings so that a given font file will only be
mapped into memory once.

DO NOT MERGE
Change-Id: I5ca69f963a434c72ec4028402ecbf9e0f0ee7148
(cherry picked from commit fffcf0a31fd4c9a4ec8aa7de70b1eda0d48fb337)
2016-02-12 19:33:26 +00:00
Ben Wagner
e2caaa9c8d Merge "Add support for gx font variation axes." into nyc-dev 2016-02-12 18:50:12 +00:00
Ben Wagner
a87b07d7fa Add support for gx font variation axes.
This adds an 'axis' child element to the 'font' element. The 'axis'
element has attributes 'tag' (a four byte identifier) and 'stylevalue'
(a float value) to the parser. This also modifies reading the font file
name in a backwards compatible fashion by using only the direct #text
children of the 'font' element. (Both the Minikin and Skia parsers now
allow the font file name on a separate line in the fonts.xml file).

This information is then passed through to Skia in order to select the
desired variation. The Skia parser already parses this way and has for
some time, so Chrome and WebView can already read this format.

Change-Id: I15623fe864fa92b2bf0705af5e389daedfb77e5c
(cherry picked from commit b8e367fb7428076ff2e4aa2a97adaed1ef806e92)
2016-02-12 16:28:35 +00:00
Matt Sarett
96ffbdc9dd Use SkCodec::MinBufferedBytes() for front buffered image decode stream
This should not change decode behavior, but it's worth noting that
the number of bytes buffered will decrease from 64 to 30.

Change-Id: I66b0e38a487c1786823b0125686b094dae5d13dc
2016-02-12 15:15:12 +00:00
Mike Reed
c3703a258d use std factory for compose-shader
Change-Id: I4562d66cb8b9b8237e6aae7c205228731732cf17
2016-02-12 14:35:28 +00:00
Matt Sarett
1819bb5230 Copy appropriate number of rows in RecyclingClippingPixelAllocator
This is used by BitmapRegionDecoder to decode into a recycled
bitmap.

Since the specification does not guarantee that the recycled
bitmap will be larger than the decoded region, we must be careful
to only to copy min(recycledHeight, decodeHeight) rows.

This should fix flakiness in the BitmapRegionDecoderTest on cts.

BUG:26978886
Change-Id: I318468b0eaa67bd9a7860824f75d45df9bf5fbce
2016-02-05 15:08:56 +00:00
Leon Scroggins III
66ce1c3b1a Lock SkBitmap before accessing color table
This only affects kIndex_8 Bitmaps, which can only be created by
decoding particular images (e.g. GIF). Without locking the SkBitmap,
colorTable() always returns NULL. Lock it so we can write the color
table to the Parcel.

BUG:26527976
Change-Id: Ifc54b06ca08db26ba6455a3830b7e671b64f37c4
2016-02-02 19:05:02 +00:00
Craig Donner
4bbb8504a7 Setting consumer protected mode on from SurfaceTexture when in a protected context.
Bug: 22775237
Bug: 22855417

Change-Id: I9608ba08b28b02f3df1cc334fdc22d645831f1f6
2016-01-22 18:00:00 -08:00
Keisuke Kuroyanagi
a3024bd702 Use light weight method for text measurement.
Bug: 24505153

Change-Id: I94823e8d546fbe0a29bc05e8841672c4cf9b5ecd
2016-01-21 18:23:57 +09:00
Richard Uhler
56178b8fcb Merge "Use NativeAllocationRegistry for Paint, Canvas, and Bitmap" 2016-01-15 18:23:29 +00:00
Leon Scroggins III
c95d2d1bd6 Restore old behavior of setLocalMatrix
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
2016-01-15 11:07:23 -05:00
Richard Uhler
775873a66a Use NativeAllocationRegistry for Paint, Canvas, and Bitmap
Bug: 23130675
Change-Id: I3fbd84ba417ac63df75f87ee2c56e3e7f3c9eb46
2016-01-13 16:14:33 -08:00
Mike Reed
8ee246b4c7 CreateLightingFilter is now on SkColorMatrixFilter
Change-Id: Ic53071aa5dc618ce1a72c531180d18304c7e522a
2016-01-13 14:35:45 +00:00
Derek Sollenberger
e1721099b5 Fix build breakage due to API update in SkShader.
bug: 25344771
Change-Id: I64198a77c75d6768091dafd5c045b02ef66dfdad
(cherry picked from commit f4eca05cdc19c095cdc0a9140d512737533a87c5)
2016-01-12 18:21:17 +00:00
Matt Sarett
3b1b68d6c7 Allow ninepatches to be encoded using non-RGBA modes
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
2016-01-07 18:17:33 +00:00
Seigo Nonaka
4ea7d1d2ab Move Language normalization code from Paint.cpp to Minikin.
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
2016-01-05 12:32:26 +09:00
Matt Sarett
e3b8f255cf Merge "Make BitmapFactory.Options API Changes" 2016-01-04 22:55:38 +00:00
Matt Sarett
5e2496bcee Make BitmapFactory.Options API Changes
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
2016-01-04 17:20:17 -05:00
Bart Sears
fb68de3fb1 Merge "Revert "Move Language normalization code from Paint.cpp to Minikin."" 2015-12-22 09:07:08 +00:00
Bart Sears
143f50789e Revert "Move Language normalization code from Paint.cpp to Minikin."
This reverts commit 5640ae00e76f71a35b10b805bbee55efac6b16f2.

Change-Id: If6dfcd74154c3fa49d1fb037ae78fd84f9844591
2015-12-22 09:03:19 +00:00
Seigo Nonaka
e824f8287b Merge "Move Language normalization code from Paint.cpp to Minikin." 2015-12-22 04:01:19 +00:00