2822 Commits

Author SHA1 Message Date
Doris Liu
967d93440c Merge "Pause infinite AVD when the drawable is not visible" into nyc-dev 2016-04-19 22:14:13 +00:00
Doris Liu
d049837397 Pause infinite AVD when the drawable is not visible
And resume when it becomes visible again

Bug: 27441375
Change-Id: Ic5140a30f5726df252ca63be9e14c495cbd76466
2016-04-18 18:48:43 -07:00
Winson Chung
de16f96c7e Merge "Take app screenshots in 565." into nyc-dev 2016-04-15 00:56:20 +00:00
Winson
a5fdde9d15 Take app screenshots in 565.
- Or to be specific, SurfaceFlinger can’t easily take 565 screenshots,
  so convert them when creating the ashmem bitmap.

Bug: 28151300
Change-Id: Ic7586659a41cc19c322136f77a1c52ef68c22707
2016-04-14 16:03:44 -07:00
Alan Viverette
112f0aa28e Basic documentation for custom drawables
Bug: 23621364
Change-Id: Ia292433ebd40d4c85ff6974def3d1f4b26926b52
2016-04-14 11:22:44 -04:00
Alan Viverette
0c34026088 Merge "Update docs for Drawable.setLayoutDirection() return value" into nyc-dev 2016-04-13 23:07:05 +00:00
Alan Viverette
2089575686 Merge "Clean up Drawable annotations" into nyc-dev 2016-04-13 15:22:04 +00:00
Alan Viverette
b8cbb806fc Clean up Drawable annotations
No functional changes.

Bug: 23621364
Change-Id: Ia5ac34eb8464ee40afd7052f34b42bb6153260bf
2016-04-13 10:14:06 -04:00
Siyamed Sinir
2519996e4e Merge "Cache Typeface.createFromAsset objects." into nyc-dev 2016-04-12 23:38:23 +00:00
Doris Liu
1ee2dd2f5f Merge "Check whether VD tree is still valid before calling native setter" into nyc-dev 2016-04-12 19:50:39 +00:00
Doris Liu
cdedc9a80d Check whether VD tree is still valid before calling native setter
VD tree is ref-counted in both Java and native. VD's child nodes are
entirely owned by the native tree, as VD nodes in native should outlive
its Java counterparts, with one exception: when there's an infinite UI
animator running on VD, the animator may have weak reference to a few
child nodes. In the case of hidden animator running infinitely, the child
nodes would keep getting the animation pulse while the rest of the tree
would have been destroyed. To prevent the setters triggered by animation
from calling into native, we need to check whether the tree is still
valid before going down into JNI.

Bug: 28104172
Change-Id: Ie9d4bf3898c0c23e620a4747624d24b8ab779743
2016-04-12 11:13:10 -07:00
Alan Viverette
78e561ce54 Update docs for Drawable.setLayoutDirection() return value
Bug: 27107547
Change-Id: I98dd706e6dfb07e7b5ec9c257cf5bea6aea2bbfc
2016-04-12 14:03:22 -04:00
Siyamed Sinir
5849500a19 Cache Typeface.createFromAsset objects.
Caches Typeface objects returned from Typeface.createFromAsset function,
Objects are cached in an LruCache with a max size of 16.

Bug: 27251075
Change-Id: I6baae4211a0d0d26422945bf1557b364cfe84b2b
2016-04-11 17:23:46 -07:00
John Reck
10dd0585c1 Framework-side of SurfaceView#getBitmap
Bug: 27708453

Change-Id: Ie6fd7eca522d3e6549d8af587c975fd7e6053649
2016-04-11 16:00:22 -07:00
Raph Levien
296bf8c55a Avoid copying of font table data, provide raw font bytes
Minikin is changing its approach to table access to use HarfBuzz to
access the tables, based on raw font data, rather than calling the
MinikinFont::GetTable() virtual method. This patch provides raw access
to the font data to make this work.

There's a bit of plumbing to make sure fonts get a pointer to the raw
data as well.

Bug: 27860101
Change-Id: I638e18cf363644bf22fbc9fb9b3358a9e731087f
2016-04-08 08:29:32 -07:00
Chris Craik
a7f775db93 Merge "Fix how outlines are sent to rendernode" into nyc-dev 2016-04-04 22:08:32 +00:00
Doris Liu
1d8e194661 Make AVD thread safe
This CL introduces staging properties to VectorDrawable, which holds
properties coming from UI thread. When staging properties are changed,
they are marked dirty, and the staging properties then get pushed to
RenderThread at sync point. In cases where no staging property has
been changed, at sync point we sync the render thread properties back
to staging properties to reflect the latest render thread animation
value change.

Also, update Vector Drawable bitmap only when it's dirty

Bug: 27343970
Bug: 27385912
Bug: 27263667
Bug: 27927674
Bug: 27774383

Change-Id: Ia864f5400a53a08dbfb284fae581fb1aac4fff87
2016-04-04 14:40:17 -07:00
Chris Craik
136d1af1cc Fix how outlines are sent to rendernode
bug:27918183

Fixes an issue where all convex outlines were pushed as empty rects to
RenderNode.

Also adds outline/reveal clip property logging, so such issues are
easier to debug in the future.

Change-Id: Ic4a996ecd09a8ef84cdf8b963bdb4853c7f6d180
2016-04-04 13:40:39 -07:00
Ben Wagner
008c6c5490 Fix shift precedence in FontListParser.
BUG=27707457

Change-Id: I7ea7a5fa67ec540401454136427b37562a4eef30
2016-03-29 23:13:49 +00:00
Siyamed Sinir
0925f40372 Update get/setFontFeatureSettings JavaDoc
Add CSS font-feature-settings URL to get/setFontFeatureSettings method
JavaDoc in both TextView and Paint.

Bug: 27857640
Change-Id: I8c20068801032407d493e4f4a15b89dcf35949d2
2016-03-28 16:14:46 -07:00
Tenghui Zhu
f35e7dc773 Merge "Update the Drawable.inflate() documentation" into nyc-dev 2016-03-28 16:30:57 +00:00
Teng-Hui Zhu
4eab3850ec Update the Drawable.inflate() documentation
Change-Id: I1f8a4e40fae43ad75550d3dffbccd831b063be03
2016-03-25 09:44:31 -07:00
Philip P. Moltmann
527bcac4d7 Merge "Fix javadoc for Icon.loadDrawableAsync(Context, OnDrawableLoadedListener, Handler)." into nyc-dev 2016-03-25 16:17:03 +00:00
Derek Sollenberger
4ee3b6216d Merge "Enforce API preconditions in Java instead of deferring to Skia." into nyc-dev 2016-03-24 15:05:14 +00:00
Sergei Vasilinetc
ab852f2972 Merge "Add offset() to Path's fast-case mode" into nyc-dev 2016-03-24 05:02:02 +00:00
Sergei Vasilinetc
5d83f69fcd Merge "Fix NinePatch insets scaling" into nyc-dev 2016-03-24 01:22:08 +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
Derek Sollenberger
336f1cbaf5 Enforce API preconditions in Java instead of deferring to Skia.
The Skia API has been relaxed on the types of input it will accept,
but in order to preserve the old API behavior we need to test for
those conditions in Java.

bug: 27682974
Change-Id: I9a33acdcd8f55c63d2e42f1733e94bf695193ac7
2016-03-23 15:04:22 -04:00
Philip P. Moltmann
4abd7ecfa2 Fix javadoc for Icon.loadDrawableAsync(Context, OnDrawableLoadedListener, Handler).
Change-Id: I349008b293066c6c45b080f945f9fe197a3f2158
2016-03-23 12:02:04 -07:00
Sergey Vasilinets
d253797588 Fix NinePatch insets scaling
bug:27323867
Change-Id: I33c0007eb9259703c73d2e3672ae1427a2155037
2016-03-22 22:35:52 -07:00
Teng-Hui Zhu
988fc6fa43 Fix callback issue for AVD on UI thread
We have created AnimatorSet from XML, but it is assigned to the AVD only when
we start the animation due to theme-ing operations.

Given listeners can be added to AVD at any time, we have to cache them if
AnimatorSet is not setup yet.

b/26979225

Change-Id: I94315892de83f93a0205efe5e70dca0cd0f0a8e3
2016-03-22 15:06:21 -07:00
Tenghui Zhu
aaa725647e Merge "Document the cache bitmap behavior for VD" into nyc-dev 2016-03-21 17:30:44 +00:00
Teng-Hui Zhu
c0b87a84c6 Document the cache bitmap behavior for VD
b/26454083

Change-Id: I22aeef9760aaf6bb79dca85740281cf94e19e601
2016-03-18 11:19:23 -07:00
Alan Viverette
a856e96eb5 Ensure nine-patch uses the best available target density
Bug: 27507887
Change-Id: Iddab4fdd2fe8fbf201dbb8ed42657a00509f42cc
2016-03-18 12:36:00 -04:00
Chris Craik
0b3a9ceed2 Merge "Avoid allocation in methods of Outline" into nyc-dev 2016-03-17 17:21:33 +00:00
Chris Craik
2c7f9a8fb9 Avoid allocation in methods of Outline
bug:26516265

Outlines are generally cached by the View system and reused, so optimize
for performance/allocation avoidance, rather than size.

Change-Id: I578d24c1255f1c1d8ebb30f3223fbe4ade4c67b4
2016-03-16 18:51:01 -07:00
Tenghui Zhu
71e806b2f4 Merge "Add fillType support to VectorDrawable" into nyc-dev 2016-03-16 21:13:24 +00:00
Chet Haase
d3eb078ac7 Merge "Document that Rect right/bottom are exclusive" into nyc-dev 2016-03-16 18:09:53 +00:00
Teng-Hui Zhu
46591f4a2d Add fillType support to VectorDrawable
Default as non-zero, which is the same as SVG.
b/27533958

Change-Id: Id20e6d3493bb4d2b4b65d7f6cdb13586631c40e4
2016-03-16 11:03:27 -07:00
Derek Sollenberger
7494eb2114 Merge "Remove all non-porterduff xfermodes from the public API" into nyc-dev 2016-03-16 12:17:16 +00:00
Chris Craik
ccdc3ebb9c Document that Rect right/bottom are exclusive
bug:22254401

Change-Id: I891e73404937b4b67210f0ac180f4cef952f8f16
2016-03-15 10:57:48 -07:00
Alan Viverette
e2578e2d9e Merge "Rename undefined inset constant" into nyc-dev 2016-03-15 17:23:35 +00:00
Alan Viverette
6888597c93 Rename undefined inset constant
Bug: 27531289
Change-Id: I31c5cc295c7f36b934eccf46cdbe7a7b293af9e0
2016-03-15 12:43:41 -04:00
John Reck
0e48bc913d Merge "Switch back to UI-driven AVD" into nyc-dev 2016-03-15 14:31:00 +00:00
John Reck
7ab0f835e6 Switch back to UI-driven AVD
Bug: 27550546
Change-Id: I7c37438555fb8a72d2ff0bc42bf5de25a31cc464
2016-03-14 17:16:10 -07:00
Chris Craik
fb354a3752 Return <0 if undefined Outline radius
bug:27531289

Change-Id: I0a2880693c59406e2d610f3a11020cde5379e230
2016-03-14 17:04:24 -07:00
Alan Viverette
781fbf28c7 Merge "Ensure all Java-side usages of config flags are using Java flags" into nyc-dev 2016-03-14 15:01:51 +00:00
Alan Viverette
f4c3d9f4c2 Merge "Invalidate DrawableContainer's cached canConstantState on child add" into nyc-dev 2016-03-11 20:19:11 +00:00
Alan Viverette
ac85f90466 Ensure all Java-side usages of config flags are using Java flags
Previously we were using native config flags in some places that expected
Java flags, and vice-versa. All usages of config flags are now annotated
to ensure we're using the right type.

Cleans up annotations on most methods that were touched.

Bug: 21161798
Change-Id: Ifd87dfb12199fc8258915d8a510e03ddb681ca89
2016-03-11 15:15:51 -05:00
Alan Viverette
48653d225b Merge "Ensure Outline consistently sets the radius to be undefined" into nyc-dev 2016-03-11 19:34:05 +00:00