2809 Commits

Author SHA1 Message Date
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
Alan Viverette
79936ddda4 Merge "Add consistent @NonNull annotations for drawable callbacks" into nyc-dev 2016-03-11 18:42:43 +00:00
Tenghui Zhu
335875bb48 Merge "Add the missing overriden API" into nyc-dev 2016-03-11 17:36:00 +00:00
Alan Viverette
5291a95715 Invalidate DrawableContainer's cached canConstantState on child add
Bug: 27553319
Change-Id: I625234baea8a992900935f562f9b767c85e527fd
2016-03-11 10:09:44 -05:00
Alan Viverette
f6d87ec193 Add consistent @NonNull annotations for drawable callbacks
Bug: 27599515
Change-Id: I33fdc5392302403bfff9cc74a8226173ec962af6
2016-03-11 10:09:14 -05: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
Alan Viverette
24bf21b894 Ensure Outline consistently sets the radius to be undefined
Radius should only be defined when the rect is also defined. Also updates
ArcShape to not return an outline, since it may be convex.

Bug: 27593976
Bug: 27592381
Change-Id: I99010b139361607af6ec8cab26c9aa1d4dcbba77
2016-03-10 15:52:00 -05:00
Teng-Hui Zhu
1af03b1d53 Add the missing overriden API
This is exposed by the CTS test.

Change-Id: Ic25fda1567d8c8504612d4e825dbb646f7db1076
2016-03-09 15:38:55 -08:00
Makoto Onuki
4a07c34ca8 Merge "ShortcutManager: add remaining APIs." into nyc-dev 2016-03-09 22:28:45 +00:00
Alan Viverette
0dda14c671 Merge "Add missing annotations, getters to GradientDrawable" into nyc-dev 2016-03-09 19:22:34 +00:00
Alan Viverette
5f63721a6c Add missing annotations, getters to GradientDrawable
Fixes getColor() NPE when colors array is null.

Bug: 27543512
Change-Id: Ieec8a2315d0a2e4ab0ddbe053bccdd8c43080857
2016-03-09 13:30:35 -05:00
Tenghui Zhu
35d44ba439 Merge "Update the VD and AVD's getOpacity()" into nyc-dev 2016-03-09 18:07:43 +00:00
Makoto Onuki
5504622fb0 ShortcutManager: add remaining APIs.
- Icons are now persisted. (under /data/system_ce, as PNGs)
- the "load icon" APIs in LauncherApps are supported.
- Implement updateShortcuts()

- Addressed all the comments on the previous CL
- @hide the newly added constructor for PersistableBundle

- Enhance incoming shortcut validation
- A lot of internal clean-up.

Bug 27548047

Change-Id: I8e3c1ccd3e0a997a6d271c84d81170f0c022b60e
2016-03-08 18:37:32 -08:00
Teng-Hui Zhu
f10d08a3d4 Update the VD and AVD's getOpacity()
static VectorDrawable should be returning Transparent while root alpha is 0.
AnimatedVectorDrawable running on RenderThread now, and the opacity should
be conservatively set as Translucent.

http://b/27554766

Change-Id: I9a78696cab94f10ba40a733cc9c00f1c2d7ebb7f
2016-03-08 15:54:50 -08:00