3632 Commits

Author SHA1 Message Date
Raph Levien
1fc0fa87d4 Support for fake bold in Minikin builds
Part of the fix for bug 15436379 Fake bold doesn't fully work (Minikin)

This patch queries the Minikin layout for when fake bold is needed,
and applies that to both shaping and drawing paint.

Also simplifies refcounting (the lifetime of all MinikinFont objects
is subsumed by the enclosing FontCollection).

Note: the fake bold flag set by the user is ignored in this patch.

Fake italics would be possible using the same mechanism, but it's
slightly more complicated (fake and user-set textSkewX values would need
to be combined, and the latter restored after drawing).

Change-Id: Ica2c4604846cbb37e5a783778b18d8993c9d4563
2014-06-10 11:37:55 -07:00
Raph Levien
71f75f1e7b Merge "Fix getFontMetrics problems" 2014-06-06 17:10:32 +00:00
Raph Levien
817ef4ae79 Fix getFontMetrics problems
Fixes a number of individual problems. In Minikin builds, gets base font
from TypefaceImpl rather than using whatever random font was in the
paint. Respects elegant metrics in ascent and descent methods as well as
getFontMetrics. Sets fixed ascent and descent values to 1900, -500,
which matches the Roboto font.

Part of the fix for bug 15467288 "Inconsistent line heights on
Minikin builds"

Change-Id: I12915f4a62de28932469c7279241eecf7320c47b
2014-06-06 10:06:01 -07:00
John Reck
743922e9df Merge changes Ie0773f85,Ie5e75505
* changes:
  Even FASTER damage calculations!
  Have all the setters return changed
2014-06-06 14:41:37 +00:00
Florin Malita
53be7b79fb Merge "Implement SkCanvasGlue::clipRegion() using clipPath()." 2014-06-06 14:04:32 +00:00
Calin Juravle
c09722dc55 am c88a5ac3: am d1d46d9d: am bbf849b1: Merge "Add missing profiler options."
* commit 'c88a5ac3ff0e3b3759c58279204bb8f6b8901669':
  Add missing profiler options.
2014-06-06 12:31:24 +00:00
Calin Juravle
c88a5ac3ff am d1d46d9d: am bbf849b1: Merge "Add missing profiler options."
* commit 'd1d46d9d5564a27dae45c2f2a62e6769402b556c':
  Add missing profiler options.
2014-06-06 12:28:17 +00:00
Calin Juravle
9828d067fb Add missing profiler options.
Bug: 12877748

Change-Id: I311b8fb7e15d512e65631bc2a52c443a271d3d3f
2014-06-06 12:55:23 +01:00
Eric Laurent
5edb85c17d Merge "add sound trigger JNI" 2014-06-05 21:04:50 +00:00
Florin Malita
1dc14ba388 Implement SkCanvasGlue::clipRegion() using clipPath().
(Canvas clipRegion() public API is scheduled for deprecation)

The SkCanvas clip stack does not support clipRegion() ops. Implementing
these in terms of clipPath() makes persisting clips for SaveFlags
emulation purposes a whole lot simpler.

Change-Id: I41d1eb9e292ce370fba224338f9071d5e4068621
2014-06-05 16:51:35 -04:00
Raph Levien
2400476943 am e0ebf19c: Merge "Support for context in Minikin shaping" into lmp-preview-dev
* commit 'e0ebf19cbfa60ba3eb0891d5e8416b70b212bc36':
  Support for context in Minikin shaping
2014-06-05 20:08:57 +00:00
Raph Levien
4c25e5a1f9 am 79fbad97: Merge "Support for scaleX and skewX in Minikin" into lmp-preview-dev
* commit '79fbad97705d191f80d7af7e494ca4a5fed3a783':
  Support for scaleX and skewX in Minikin
2014-06-05 20:08:56 +00:00
Raph Levien
0ead890d1c Merge "Support for context in Minikin shaping" into lmp-preview-dev 2014-06-05 19:37:08 +00:00
Raph Levien
30d3c97f29 Merge "Support for scaleX and skewX in Minikin" into lmp-preview-dev 2014-06-05 19:26:33 +00:00
Raph Levien
6bfd7e7df3 Support for context in Minikin shaping
This patch uses the Minikin's new doLayout API that supports context,
and has some simple refactoring (pass css as string rather than setting
on the Layout object) to use this api.

Change-Id: I899474f81d377f3106e95ee3eb8d0fcc44c23ac2
2014-06-05 11:01:21 -07:00
Raph Levien
e95b5850ac Support for scaleX and skewX in Minikin
Passes textScaleX and textSkewX parameters, as well as paint flags from
the paint to Minikin, to support nontrivial scale and stretch of text.
Passing paint flags should minimize kerning artifacts arising from
mismatch of glyph rendering in layout and drawing.

Also, replaces unsafe snprintf to a fixed size buffer with a safe
version, which still avoids an allocation per layout operation.

This is part of the fix for bug 15186705 "Usability of the suggestion
strip in recent OTA's is severely reduced"

Change-Id: I79788383135836f4c21fb84405f36382627bf959
2014-06-05 10:57:18 -07:00
Eric Laurent
60b62bc5c1 add sound trigger JNI
Add JNI for sound trigger hardware native service.

Change-Id: Idd0ee42c7af5fe20e7d8295994211de3a517bd13
2014-06-04 17:59:12 -07:00
Raph Levien
8608bbb207 am 626b82f6: Merge "Query style from asset-created font (Minikin)" into lmp-preview-dev
* commit '626b82f63e4d7ea97187bec313b5cb687bb501b7':
  Query style from asset-created font (Minikin)
2014-06-04 22:19:56 +00:00
Raph Levien
8224ad4f70 Merge "Query style from asset-created font (Minikin)" into lmp-preview-dev 2014-06-04 22:05:41 +00:00
Eric Laurent
9e80b82d96 am b1873bdd: Merge "AudioSystem JNI: fix audio gain channel count" into lmp-preview-dev
* commit 'b1873bdd565509097b6fe711773dc023589f9a11':
  AudioSystem JNI: fix audio gain channel count
2014-06-04 21:32:13 +00:00
Raph Levien
f8423bae17 am 8fad12dc: Merge "Fix incorrect getStringBounds (Minikin)" into lmp-preview-dev
* commit '8fad12dc66f47af2fd394f44858802d10cf110f1':
  Fix incorrect getStringBounds (Minikin)
2014-06-04 21:32:07 +00:00
Raph Levien
1633caef58 Query style from asset-created font (Minikin)
This patch sets fStyle on the TypefaceImpl based on querying the font,
which is important in the Typeface.createFromAsset path. This fixes both
the style returned from getStyle() and also selects fallback fonts to
best match the style of the main font.

Fixes bug 15429916: "Typeface.getStyle always returning 0 in some L
devices".

Change-Id: I1992ba1e65e7f488d331e175f5f12843f67c2faa
2014-06-04 13:46:35 -07:00
Eric Laurent
88db5c37ad Merge "AudioSystem JNI: fix audio gain channel count" into lmp-preview-dev 2014-06-04 19:21:57 +00:00
John Reck
e4267ea4f2 Even FASTER damage calculations!
* Now with more native!
 * Less matrix math thanks to bulk-property-update support!
 * Zero JNI on the View.damageInParent() path!
 * Fully aware of RT-driven animators!
 * Likely full of new and exciting bugs!
 * But it also fixes at least 1 existing invalidate bug!

Change-Id: Ie0773f85a60850ff2668370c58defef2e8aa079f
2014-06-04 12:21:26 -07:00
Raph Levien
c5dc037008 am aef648f4: Merge "Better Minikin integration" into lmp-preview-dev
* commit 'aef648f405a6f2ed2e523e69cd6f1da884f4b9dd':
  Better Minikin integration
2014-06-04 18:44:32 +00:00
Ruben Brunk
ccee3b158a am c354b069: Merge "DNG: Write out additional fields." into lmp-preview-dev
* commit 'c354b06955508816af29daefdac5ef9ea9b89fbb':
  DNG: Write out additional fields.
2014-06-04 18:43:50 +00:00
John Reck
79c7de77a7 Have all the setters return changed
Change-Id: Ie5e755058a7094bb0c2fce60ec3cef47c23823ce
2014-06-04 11:01:04 -07:00
Eric Laurent
0078c7cc59 AudioSystem JNI: fix audio gain channel count
Use audio utility function instead of popcount
to get channel count from channel mask

Bug: 14815883.
Change-Id: Ia9a898c9f7f03d22caeefb418be1e33f65f7b7bb
2014-06-04 09:49:52 -07:00
Florin Malita
676f92e9a7 Merge "Canvas JNI cleanup." 2014-06-04 16:04:45 +00:00
Florin Malita
95d49149cc Canvas JNI cleanup.
As pointed out in a previous patch review, some native Canvas methods do not
receive a native canvas handle and instead have to use GraphicsJNI to query
the object mNativeCanvasWrapper field.

To avoid the extra JNI call, this change adds the missing Java wrapper
methods and ensures that all native calls are passed efficient native
handles.

Also, some native methods are consolidated: save, saveAll -> save,
clipRect* -> clipRect.

Change-Id: I2eae4a633f6a463d9fbae2ca632661acc8b5cfc3
2014-06-04 11:09:18 -04:00
Leon Scroggins III
a578ab00c4 Merge "Ignore inPurgeable and inInputShareable." 2014-06-04 14:04:18 +00:00
Raph Levien
854363e3d2 Fix incorrect getStringBounds (Minikin)
This patch wires up getStringBounds to do the layout with Minikin to get
accurate bounds, and with the correct typeface. It fixes bug 15416575
"getStringBounds gives wrong result in Minikin".

Change-Id: I5c020bc372acb1d785a33c3c296239c151bd8c87
2014-06-03 21:11:06 -07:00
Raph Levien
38bd7b9c4d Merge "Better Minikin integration" into lmp-preview-dev 2014-06-04 00:46:25 +00:00
Raph Levien
f2114d5646 Better Minikin integration
This patch improves the Minikin integration in a number of ways,
including:

Software rendering does text decorations and handles alignment
correctly. This fixes bug 15139067 "Centered text isn't working".

Paint implements getTextPath. This fixes bug 15143354 "Text rendering in
Maps Navigation wrong typeface?"

Also a bit of refactoring, since there was duplicated code for iterating
font runs that's now a static method in MinikinUtils.

Change-Id: I4cfdb2c0559982376348325a757d95235fab1768
2014-06-03 17:44:35 -07:00
Ruben Brunk
3f6680ad48 Merge "DNG: Write out additional fields." into lmp-preview-dev 2014-06-03 23:38:57 +00:00
Ruben Brunk
b8df8e07d6 DNG: Write out additional fields.
Bug: 15112503

Change-Id: Ib06d9a5e70e6e3d5063a95a7109538ef64f03334
2014-06-03 15:07:50 -07:00
Leon Scroggins III
0aa39dc2dc Ignore inPurgeable and inInputShareable.
These are discouraged anyway, due to the fact that using them may
result in decoding on the UI thread. Now that they are ignored, the
images will still be decoded; they just will never have their
memory purged, meaning there could be a RAM penalty. This is
acceptable, since apps are encouraged to instead use inBitmap to
manage bitmap memory.

This incidentally fixes BUG:15390468 by converting purgeable index8
(e.g. gif) images to non purgeable.

Change-Id: Ieaf3ab25d28d93fb94bdaea1eb3bd762f163b09a
2014-06-03 14:05:58 -04:00
Raph Levien
690d45157d am faa91203: Merge "Support fallbacks for custom typefaces (Minikin)" into lmp-preview-dev
* commit 'faa912037ca4895eb99155a4a53354435ee413c2':
  Support fallbacks for custom typefaces (Minikin)
2014-06-03 17:15:56 +00:00
Raph Levien
1044046aa9 am 8e3605e4: Merge "Check for NULL on TypefaceImpl unref" into lmp-preview-dev
* commit '8e3605e4de5a109792acca22c37976ac52ee571e':
  Check for NULL on TypefaceImpl unref
2014-06-03 17:15:21 +00:00
John Reck
7e3a7fc35f Merge "Remove GLRenderer" 2014-06-03 14:27:26 +00:00
Narayan Kamath
c32a244e90 am dd2e9d33: am 7cb13f8a: Merge "Scan for renderscript files before deciding ABIs."
* commit 'dd2e9d3386d2d74f99f79bcad951ff5cdefa6fab':
  Scan for renderscript files before deciding ABIs.
2014-06-03 13:58:35 +00:00
Narayan Kamath
dd2e9d3386 am 7cb13f8a: Merge "Scan for renderscript files before deciding ABIs."
* commit '7cb13f8a0a40f3d971a953b330f38bfcfb001c5e':
  Scan for renderscript files before deciding ABIs.
2014-06-03 13:24:50 +00:00
Narayan Kamath
d47e38b634 Scan for renderscript files before deciding ABIs.
The presence of ".bc" files in an APK implies
incompatibility with any of the 64 bit ABIs.

bug: 14900093

Change-Id: I66ca339a9a149cb3b7e7b349033d80acdeb4140a
2014-06-03 12:58:35 +01:00
John Reck
84a4c887a0 Remove GLRenderer
Change-Id: I180286417c1a354fc7eb1eadb1884ac6add0795c
2014-06-02 16:33:52 -07:00
Raph Levien
596f0b1a03 Merge "Support fallbacks for custom typefaces (Minikin)" into lmp-preview-dev 2014-06-02 22:54:58 +00:00
Raph Levien
44e3da3c28 Merge "Check for NULL on TypefaceImpl unref" into lmp-preview-dev 2014-06-02 21:17:49 +00:00
Raph Levien
a0cba0fde3 Check for NULL on TypefaceImpl unref
It's possible for a TypefaceImpl to contain a null pointer, which was
causing crashes on unref. This patch just checks for NULL.

Fixes bug 15104801 "Aviate Launcher crashes on startup - Hammerhead L
AAV49B"

Change-Id: Idf9f176c54bf81ff3daacc0b33e95aa9d8bbe57f
2014-06-02 13:37:34 -07:00
John Reck
776512d4b6 am feccbdc4: Merge "Add setStartValue to RNA" into lmp-preview-dev
* commit 'feccbdc4d0bee3eb4c395bd93ba51cbc6616527a':
  Add setStartValue to RNA
2014-06-02 18:19:44 +00:00
John Reck
c6b3264e16 Add setStartValue to RNA
Bug: 15198607
 Should be good-enough for Ripples to use for pseudo-chaining
 support.

Change-Id: Ia8666928ccb69ae401cb583751632a52bd928b63
2014-06-02 11:00:09 -07:00
Raph Levien
d573794d83 Support fallbacks for custom typefaces (Minikin)
This patch adds the fallback font list to custom typefaces created from
files and assets, as well as those created by name. This is a fix for
the deskclock half of bug 15139067 "Centered text isn't working".

Change-Id: I0cc60951953dfb73817a98ddfee5713f0387ee90
2014-06-02 10:56:23 -07:00