2852 Commits

Author SHA1 Message Date
Doris Liu
718cd3eb70 Handle hidden RT VectorDrawable animators
This CL changes the target of VD specific animators to VectorDrawable,
instead of RenderNode. The benefit of doing so is that animators can
now detect whether the animation is meaningful by checking whether
their VD target is in the display list. If not, that means the VD is
not drawing for the current frame, in which case we can be smarter
and more power efficient by removing the animator from the list and
posting a delayed onFinished listener callback.

By setting VD as the animation target, when an ImageView decides to
update its drawable from one AVD to something else, we'll be able
to detect that the previous AVD is no longer in the display list,
and stop providing animation pulse to the stale AVD, which is
something we couldn't do previously.  This change also
handles the case where one AVD instance could be drawn in two
different views.

Bug: 27441375
Change-Id: Iaad1ed09cfd526276b95db0dd695275c28e074e8
2016-06-09 10:27:59 -07:00
Sergei Vasilinetc
e4e240f13f Merge "HWUI: do not call glCopyTexSubImage2D on empty area." into nyc-dev 2016-06-02 01:36:35 +00:00
sergeyv
ab3f8c2e32 HWUI: do not call glCopyTexSubImage2D on empty area.
Previous check .isEmpty() is not sufficient, because getWidth() may have
value 0.5, so technically it is not empty, but when this size is passed
to texture calls it is converted to uint_32 and it becomes zero.

bug:28941093
Change-Id: Ia7c2bf0340466d5376f235fb5da54ad2ddfa0a03
2016-06-01 23:55:32 +00:00
Sergei Vasilinetc
21a608f27f Merge "HWUI: do nothing in case of empty layer" into nyc-dev 2016-06-01 00:15:32 +00:00
sergeyv
aebbbef565 HWUI: do nothing in case of empty layer
bug:28862058
Change-Id: I8e09a5c33d0eb00a829be4df706dab49cad48b1e
2016-05-31 14:18:02 -07:00
Doris Liu
028029730b Copy native tree's property when mutate vector drawable
When mutating vector drawables, we need to not only copy over
the VD tree structure, but also the properties of the VD tree,
such as alpha.

Bug: 28974071
Change-Id: I265e7e3cb92455b876cae248bcb9811230cb34f9
2016-05-27 10:54:55 -07:00
John Reck
c9bb1a38d3 Fix a translate issue with saveLayer
Bug: 28667141

saveLayer clips the layer to the size it needs to
be and will translate content if necessary, but
the drawLayerOp that results from that was not
translated to handle the shifted draw content.

This fixes that

Change-Id: I3c9ffd5d0282fa1b958bced94c25e9744281e9be
2016-05-24 15:06:01 -07:00
TreeHugger Robot
189e3e5ec5 Merge "Fix hw layer overdraw/update visualization" into nyc-dev 2016-05-16 23:58:28 +00:00
Chris Craik
3741328947 Fix hw layer overdraw/update visualization
Fixes: 28748255

Change-Id: I83b531cdf5e4407fd17edd72d96e6189924926fa
2016-05-16 13:54:02 -07:00
Chris Craik
36ce80d530 Fix Skia filter behavior test
Fixes: 28751534

Change-Id: Ie5e2ee946b21702539fc0cc7358d0f9550e7d095
2016-05-12 17:55:47 -07:00
Sergei Vasilinetc
45d6e79565 Merge "Draw textShadow always first." into nyc-dev 2016-05-11 21:34:19 +00:00
sergeyv
284b765e3c Draw textShadow always first.
Interleaving text and shadow rendering resulted in issuing draw commands from FontRenderer::renderDropShadow.

bug: 28528923
Change-Id: Ife2677f58180aaf10ec74d7c6efe5c44fe248daa
2016-05-11 10:30:14 -07:00
TreeHugger Robot
f8892359b0 Merge "Add layer tracing tags in new pipeline" into nyc-dev 2016-05-05 19:57:08 +00:00
Chris Craik
aff230f6f9 Add layer tracing tags in new pipeline
bug:28596354

Change-Id: I351cb50c8c9ddfc73be73d28a1af94d2a8f9992e
2016-05-04 16:27:29 -07:00
TreeHugger Robot
b2e36d7939 Merge "Use LUT for computing final shadow alpha" into nyc-dev 2016-05-04 01:03:42 +00:00
Chris Craik
138c21fbec Use LUT for computing final shadow alpha
bug:27415250

Significantly reduces shadow fragment shader computation.

Change-Id: Ie9b3c712700754b3734d0ae9cda8751c298fc59e
2016-05-03 14:36:29 -07:00
Chris Craik
7039adafa9 Merge "Add LightingFilter behavior test" into nyc-dev 2016-05-03 21:12:04 +00:00
Doris Liu
6543533f29 Merge "Count native allocation for VD against Java heap" into nyc-dev 2016-05-03 16:41:20 +00:00
John Reck
ded1d3c45b Remove high-overhead low-signal trace section
Bug: 28519669

This trace tag makes shadows look way more expensive
than they actually are, particularly troublesome
when tracing things with large number of shadows.

Change-Id: Ib6558b1388edd4b006ec15127470cb9ab563f954
2016-05-02 16:24:28 -07:00
Doris Liu
f8d131cc8d Count native allocation for VD against Java heap
There are two parts to VD's native allocation:
1) VD's internal data structure (i.e. groups, paths, etc that make
   up of the VD tree). This structure can change, when a VD is used
   to load a different drawable resource.
2) Two bitmap caches, not both of which will necessarily be allocated
   The size of the bitmap cache depends on canvas matrix and drawable
   bounds, and therefore can often change.

We need to count the native allocation from the above against Java heap.

Bug: 26269056
Change-Id: If833aedcf7f3efe00ea73a41ddccb1b48066ffd8
2016-05-02 15:34:40 -07:00
Chris Craik
20136f3194 Add LightingFilter behavior test
bug:28519669

Change-Id: I81ca4109bae04387f2eb73374d0f11821745fea1
2016-05-02 09:43:30 -07:00
John Reck
2f69d6d4fd Support transform'd GraphicBuffers
Bug: 28428955
Change-Id: I23e2fc9b96a67c7cfda42d9d7319e478194a7fa7
2016-04-28 13:32:27 -07:00
Chris Craik
8438a7297c Merge "Fix oval positioning when drawn with patheffect" into nyc-dev 2016-04-27 20:52:51 +00:00
John Reck
7f209d37f1 Merge "API tweaks to PixelCopy and make it public" into nyc-dev 2016-04-27 14:36:53 +00:00
John Reck
e94cbc76d5 API tweaks to PixelCopy and make it public
Bug: 27708453
Change-Id: I81667ce42f9ca1c1a13e1e61299927900845fc84
2016-04-26 15:41:43 -07:00
Chris Craik
e98a046d31 Fix oval positioning when drawn with patheffect
Fixes: 28396277

Change-Id: I9e21696d81d7cd219f3eaa081bf3d9ba988fe051
2016-04-26 15:38:33 -07:00
Sergei Vasilinetc
b7d1657016 Merge "Stop always set OffsetByFudgeFactor in renderVertexBuffer" into nyc-dev 2016-04-26 21:39:09 +00:00
John Reck
a5bbbe55b7 Merge "PixelCopy fixes" into nyc-dev 2016-04-25 14:55:28 +00:00
John Reck
2f78327cfc PixelCopy fixes
Bug: 27708453

Fixes some issues with camera sources. Previously
it was using GL_TEXTURE_2D target which doesn't
work properly if the source is YUV. It is critical
to ensure GL_TEXTURE_EXTERNAL_OES is used throughout
so the right sampler is used.

Change-Id: I0dcd8941ba08331f24809467b0e828663a38e93b
2016-04-22 16:31:17 -07:00
sergeyv
92a5d4b99a Stop always set OffsetByFudgeFactor in renderVertexBuffer
bug:27857128
Change-Id: Id92e0a5790b14f76cfa8bb38e8b11ce649775da0
2016-04-21 15:20:27 -07:00
Chris Craik
f3754a8428 Fix shadow radius too large for RS
bug:28276925

Change-Id: I3d962ace75be7bbf49f5a95320390d8f5a9bf951
2016-04-19 18:15:51 -07:00
John Reck
9110429f0d Merge "Don't reuse LOST_SURFACE for stopped" into nyc-dev 2016-04-19 14:45:16 +00:00
John Reck
8cddce3f8f Merge "Make getFrameNumber lazy" into nyc-dev 2016-04-18 23:20:39 +00:00
John Reck
28912a5084 Make getFrameNumber lazy
Change-Id: I783de544ad9a3636ea90f1c8c4034738997bfbc8
Fixes: 28246085
2016-04-18 14:34:18 -07:00
Chris Craik
c79c3246c9 Merge "Improve multi-window render clipping logic" into nyc-dev 2016-04-18 19:40:50 +00:00
John Reck
9a17da8125 Don't reuse LOST_SURFACE for stopped
Fixes: 28218991

If a draw() happens while we are stopped, don't report
that the surface is lost because this will prompt
a tear-down of the surface which isn't desired. It can
result in ViewRootImpl ending up in an internally-bad state
in this case.

Change-Id: If3eb8c6bc8702299e5330bc0917952624dce3b7e
2016-04-18 11:29:35 -07:00
Chris Craik
9cd1bbe5c9 Improve multi-window render clipping logic
Fixes: 28125010

Restructures 'scene defer', to implement window backdrop overdraw
avoidance in new render pipeline, and disable clipping to content draw
bounds.

Also restructures FrameBuilder's constructors, to separate out into
multiple defer methods.

Change-Id: I53facb904c1a4a4acc493d8a489921a79a50494e
2016-04-18 10:39:02 -07:00
John Reck
f91cbc7fd2 Merge "Switch JankTracker to FrameInfo::duration()" into nyc-dev 2016-04-15 23:47:01 +00:00
John Reck
126720aa65 Switch JankTracker to FrameInfo::duration()
Fixes: 27533462

FrameInfo::duration() will remove time spent waiting
in the queue from the duration. This is desired because
that time is otherwise accounted for by the previous frame,
so we don't want to double count it.

This shows up mostly in TestSceneRunner & shadowgrid2
due to a combination of slow frame times and continous rendering.

Change-Id: I27c42d5c24d266de4ada8ea00ec9164d518754f8
2016-04-15 15:19:50 -07:00
John Reck
b8563f1ae4 Merge "Turn off HWUI_ENABLE_OPENGL_VALIDATION" into nyc-dev 2016-04-15 20:12:29 +00:00
John Reck
85cfc8c368 Merge "Add a callback for when a gl functor is released" into nyc-dev 2016-04-15 19:26:16 +00:00
John Reck
756619da20 Turn off HWUI_ENABLE_OPENGL_VALIDATION
Fixes: 28212865

Disable glGetError() checking after every gl call

Change-Id: I849934172a56150122a8d0114b0307515d988fe7
2016-04-15 11:31:09 -07:00
John Reck
cd1c3eba69 Add a callback for when a gl functor is released
Bug: 27709981

Change-Id: Id5be3e8f88d6d84a9c59c7ed23e7e8862feefbe8
2016-04-15 10:56:53 -07:00
Doris Liu
da62de4f65 Merge "Fix ref count of fillGradient and strokeGradient" into nyc-dev 2016-04-15 17:47:25 +00:00
Doris Liu
ad21fe2762 Fix ref count of fillGradient and strokeGradient
Bug: 28086621
Change-Id: Ibb52bdfb20904f0ad102878fbb33d3679bb5132d
2016-04-14 18:33:27 -07:00
John Reck
d6a25c2b3e Merge "Revert "Revert "Make stopped state a first-class thing""" into nyc-dev 2016-04-14 17:40:52 +00:00
John Reck
8afcc76920 Revert "Revert "Make stopped state a first-class thing""
This reverts commit eab3f2658aa41d37c3b05d49a2ce4e3f4ed85399.

Fixes first-frame issue, mReportNextDraw needs to override
mStopped

Fixes: 28118961
Fixes: 27286867

Change-Id: I5c811759637d08ba9f3b342016d1b3006986d5a2
2016-04-14 10:39:03 -07:00
Chris Craik
5ce4e2e78f Merge "Avoid reentrance on ClipArea APIs" into nyc-dev 2016-04-14 17:12:20 +00:00
Chris Craik
bf27b995ae Avoid reentrance on ClipArea APIs
bug:28144676

Calling ClipArea::clipRegion from within ClipArea::clipPathWithTransform
has us handling op-based special casing twice, which caused all clip
paths to appear to be replace ops.

Change-Id: Ib842db53ffed4eee29470f773d59a3a1d07a1a0e
2016-04-13 15:59:32 -07:00
Doris Liu
a184abe4b0 Merge "Allow leading spaces in path string (to keep behavior consistent)" into nyc-dev 2016-04-13 17:26:54 +00:00