2492 Commits

Author SHA1 Message Date
Chris Craik
2f1d09c3c5 Merge "Use default constructor to get anti-aliasing" into mnc-dev 2015-04-28 22:06:17 +00:00
Chris Craik
58fc522a69 Use default constructor to get anti-aliasing
Change-Id: I3e078a3bc91a2fd703984ba18b5e7e98069b32f1
2015-04-28 11:49:27 -07:00
Alan Viverette
a54cd38ba5 Layout layers without intrinsic dimensions using FILL gravity
Addresses a regression in Calendar where a custom drawable that doesn't
implement intrinsic bounds is laid out incorrectly. Also fixes an issue
where ColorDrawable would be laid out incorrectly.

Bug: 20643614
Change-Id: I796f0d3e189e482cf6fa169a5dd13f654d72653c
2015-04-28 10:45:26 -07:00
Raph Levien
c6abf5bff6 Expose drawTextRun publicly
For correct low-level drawing of low level text, a method that
includes context for shaping is necessary, and it's similarly useful
to provide the direction explicitly rather than running the BiDi
algorithm on the text. The drawTextRun method (in both char[] and
CharSequence variants) has provided this functionality for several
major releases but has been internal. This patch exposes the
methods publicly, and also improves the doc strings for both
the new method and some related ones.

Bug: 20193553
Change-Id: I9be33ca5ae3e7db2b69a56298400671d5ef8ad05
2015-04-27 15:33:03 -07:00
Chris Craik
1b60cc0529 Anti-alias by default
Change-Id: I19434717dd3af4fdcffbfcca2ffbb485dfebe644
2015-04-27 18:11:57 +00:00
Ed Heyl
88d109d2c5 Merge "Fix the build: Revert "Anti-alias by default"" 2015-04-24 04:58:48 +00:00
Ed Heyl
1c44ba9fd4 Fix the build: Revert "Anti-alias by default"
This reverts commit d34b7329935a6f9ffdc9a40c01f7b558e07830d4.

Change-Id: I74e63570ce868e6d8c36fd2e1c864419bd6102e4
2015-04-24 04:57:24 +00:00
Lajos Molnar
d1d27c1543 media: add flexible YUV422, 444, and RGB/RGBA formats
These are used by Media.Image on getOutputImage.

Change-Id: I171c5b90423800eeab4e36625dcf727a2a2affcd
2015-04-23 19:14:32 -07:00
Chris Craik
01fb343fe8 Merge "Anti-alias by default" 2015-04-23 23:06:40 +00:00
Chet Haase
a20ea2f056 Merge "Add annotation to Rect.intersect()" 2015-04-23 13:29:59 +00:00
Chet Haase
5b3edbde20 Add annotation to Rect.intersect()
Failing to check the return result from intersect() can cause artifacts
because the developer may assume that the rect has been changed to the intersection.
In particular, when the two rects do not overlap, there is no change made to the
source rect. Instead, the method simply returns false. When developers do not
check that return value, they may use the source rect and get undefined results.

This change adds the @CheckResults annotation that will cause a Lint warning
when developers call this method without checking the return value.

Change-Id: I476367d74e712038c248c2379fb124734298fcc1
2015-04-22 17:07:21 -07:00
Alan Viverette
3797a788dc Merge "Fix visual styling for Material Spinner background" 2015-04-22 20:41:30 +00:00
John Reck
c1b33d665c GraphicsJNI Canvas cleanup
Change-Id: I72e142986a8bc9f464c1951b6b5187919de3462e
2015-04-22 09:34:34 -07:00
Alan Viverette
388cd3b69c Fix visual styling for Material Spinner background
Adds explicit padding attributes to LayerDrawable, constrains the ripple
to fit within the container to avoid projection.

Bug: 19359934
Bug: 20083467
Change-Id: I46da941fba37552adeb2c1fe617b799f576df0c6
2015-04-21 13:00:33 -07:00
Raph Levien
1c17ba5f83 Merge "Add Paint methods for cursor positioning" 2015-04-20 22:13:55 +00:00
John Reck
8222a7ec81 Merge "Revert "Change how Java Bitmaps are accessed in a few places"" 2015-04-20 22:07:45 +00:00
John Reck
edc22fba59 Revert "Change how Java Bitmaps are accessed in a few places"
Bug: 20207616

This reverts commit a771b9861d11671c780092d35c0062eeefcf37c0.

Change-Id: Ifd891cc075274a7986e987229e0fed5a04ed9ff0
2015-04-20 22:06:31 +00:00
John Reck
9d4efdf280 Revert "A bunch more cleanups"
This reverts commit c294d128d03bc9a9982b273a82516c04583438cc.

Change-Id: Id1ebb236950f7c36c6d86e1dd95566d3a200748d
2015-04-17 20:47:27 +00:00
John Reck
7809f835ca Revert "Move AssetAtlas off of SkBitmap*"
This reverts commit 87ffb63d90fb6dd2689fe72dcb24fda9a6156220.

Change-Id: I92adfcee454a0a19020cdd9e96a134be0ee529aa
2015-04-17 20:46:47 +00:00
John Reck
afbeb2c237 Merge "Revert "Remove Bitmap#getSkBitmap"" 2015-04-17 20:46:22 +00:00
John Reck
1ff961dd6d Revert "Remove Bitmap#getSkBitmap"
This reverts commit 4bd981ec533a65e8dee053a0a709b484770b0a76.

Change-Id: I5c92cd955c6e70e197dc5cbc5dfeed8369a24a31
2015-04-17 20:45:15 +00:00
Alan Viverette
65aea84c5a Merge "Move date picker arrows out of SimpleMonthView" 2015-04-17 18:16:19 +00:00
Alan Viverette
78bf1d329a Move date picker arrows out of SimpleMonthView
Also fixes incorrect docs in Drawable.

Bug: 20188255
Change-Id: I01c8563f734d9c1dad1e149bee80c651981e469f
2015-04-17 10:39:22 -07:00
John Reck
4bd981ec53 Remove Bitmap#getSkBitmap
Change-Id: Ifb9047b426122d3e5a445eb7a0eb3fce38dedf27
2015-04-15 15:56:12 -07:00
John Reck
87ffb63d90 Move AssetAtlas off of SkBitmap*
Switched to SkPixelRef*

Change-Id: I4a1d9dc6c55c1ebcce6b0b8c585e69559e523898
2015-04-15 13:27:05 -07:00
Raph Levien
a027ec5c2d Add Paint methods for cursor positioning
Adds methods to Paint for finding an offset corresponding to an
advance, and for finding the advance corresponding to an offset,
useful for positioning and drawing a cursor.

Change-Id: Id57402ddd1980650f1d0d2f8bbdb75e43612ec51
2015-04-14 23:51:46 -07:00
John Reck
c294d128d0 A bunch more cleanups
Switch a few places to using android::canvas
instead of SkCanvas as well which eliminated
some JNI

Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
2015-04-14 15:38:22 -07:00
Chris Craik
d34b732993 Anti-alias by default
Change-Id: I4d29cae73b05b7ffa03212acdbb13d7b0cf8f905
2015-04-13 12:39:11 -07:00
Alan Viverette
0381d0b665 Merge "Allow null layers in LayerDrawable" 2015-04-13 19:28:49 +00:00
John Reck
073f36c6c1 Merge "Change how Java Bitmaps are accessed in a few places" 2015-04-13 19:20:59 +00:00
Alan Viverette
7a583e7bb3 Allow null layers in LayerDrawable
Bug: 20098214
Change-Id: I80285ddda7101ab7403048d38f9c40af6b692a1a
2015-04-13 11:03:55 -07:00
John Reck
a771b9861d Change how Java Bitmaps are accessed in a few places
Stop assuming that a Java Bitmap has a SkBitmap* that
has some externally managed lifecycle, and instead switch
a bunch of users to accessing the bitmap by providing
their own SkBitmap* on which to set the (ref counted!)
SkPixelRef* instead

Change-Id: I0fd9e193968b41e5597784140d56b4885906864a
2015-04-13 09:50:42 -07:00
Alan Viverette
d18c59b3e6 Merge "Don't change state when inflating LayerDrawable" 2015-04-10 17:50:21 +00:00
Alan Viverette
9eaa604116 Don't change state when inflating LayerDrawable
Bug: 20098214
Change-Id: I6968697053587454bba42c0652efd99b9c8a8e25
2015-04-09 17:28:24 -07:00
Alan Viverette
45f207d6d9 Only parse LayerDrawable child items when necessary
Bug: 20098214
Change-Id: Ie9da5f6e494ede47f9fdc94481a3f8ca41d3ef00
2015-04-09 13:14:32 -07:00
Chris Craik
b7acab634a Merge "Fix path clipping in VectorDrawable" 2015-04-06 18:05:00 +00:00
Chris Craik
e9c01a40a2 Fix path clipping in VectorDrawable
bug:19946683

Change-Id: I773957df7459eb72ea5d505afb0daac08239ecbf
2015-04-06 10:50:36 -07:00
ztenghui
df62ab4833 Merge "Add group scaling factor into stroke width." 2015-04-03 20:09:02 +00:00
Raph Levien
f673acb6c9 Merge "Add Paint.hasGlyph method" 2015-04-02 23:27:24 +00:00
Raph Levien
f7f969e67e Add Paint.hasGlyph method
This patch adds a method to determine whether a typeface has a glyph
to support a particular Unicode character or sequence.

The implementation is based on shaping the text and checking for the
presence of .notdef glyphs, and counting the number of glyphs in the
ligature case. In the case of variation selector control characters, it
currently just returns false because there is no variation selector
support yet (Mongolian Free Variation Selectors work because they're
shaped with GSUB instead).

Change-Id: I8ee4ae0d6e81a0ac57f961eb02dcc35aabd87042
2015-04-02 23:14:58 +00:00
ztenghui
9af77a4ce2 Add group scaling factor into stroke width.
Originally, stroke width is independent of group scaling.
But that is a bug and causing animation trouble.

b/19501782

Change-Id: I33d5e44f2f8b2a82fee1a5a326223a39aaffa86c
2015-04-02 16:09:03 -07:00
Chris Craik
ec3c97d27f Merge "Add compat path for restore underflow" 2015-04-02 22:38:49 +00:00
Chris Craik
3891f3ad59 Add compat path for restore underflow
bug:19829784

Change-Id: Ia761664208ab80c055ca11174db3ddc74457b92b
2015-04-02 15:30:32 -07:00
Yuichi Araki
a4dc29a721 am 428c2fa0: am c3fbf13d: am e2fc3adb: am 61ce6c9b: am 776cf41d: Fix a broken link in javadoc
* commit '428c2fa0f8b3c49e8bd48458c15363fcd98e8944':
  Fix a broken link in javadoc
2015-04-02 20:38:08 +00:00
Yuichi Araki
c3fbf13d52 am e2fc3adb: am 61ce6c9b: am 776cf41d: Fix a broken link in javadoc
* commit 'e2fc3adbb4040400496aebdab80c4cac1083da27':
  Fix a broken link in javadoc
2015-04-02 20:19:09 +00:00
Alan Viverette
0daa5713ee Merge "Fix issues with theming of preloaded ColorStateLists" 2015-04-02 18:02:04 +00:00
Yuichi Araki
776cf41d7c Fix a broken link in javadoc
Bug: 19856130

Change-Id: I0456e951f8bed36e3a62ddfd882f9c2d2bef9627
2015-04-02 04:03:07 +00:00
Seigo Nonaka
77840f4e8f Merge "Fix cursor position calculation." 2015-04-02 00:07:08 +00:00
Seigo Nonaka
b89a605b58 Fix cursor position calculation.
The cursor position calculation of not well known CharSequence implementation
has problem. getTextRunCursor() returns the relative path of passed string
buffer, so need to fix the origin by adding the copied buffer origin.

BUG: 17448027
Change-Id: I413c553bfccbccee4a390b6c83aa09ac7fd04126
2015-04-02 06:13:37 +09:00
Chet Haase
ffb73620a2 Fix Drawable.getOpacity() docs
Issue #17140095 Drawable#getOpacity() is documented as ignoring custom alpha, e.g. setAlpha(). It is lying.

Change-Id: Iaef094be750c58a43e13491e7bf9d9b7e56e23d2
2015-04-01 13:42:25 -07:00