7328 Commits

Author SHA1 Message Date
John Reck
dc87c52cd5 Add leak-checking to unit tests
Initial pass at leak-detection on the unit
tests. Due to quirks in jemalloc we need
to run the leak check on both the main thread
and the RT thread to get decent leak coverage.

Change-Id: I0dce754aef5593f1ef5c3bed86e1168437a34b74
2016-03-08 10:20:28 -08:00
John Reck
0418afa362 Switch hwui to google-benchmark
Change-Id: Ia2b24b8288cb8dc4f9176f4132a24ddcae9b6edd
2016-03-07 13:42:11 -08:00
Adam Lesinski
53185a50d1 Merge "Revert "AssetManager: Cache a pre-filtered list of configurations"" into nyc-dev 2016-03-07 20:22:24 +00:00
Adam Lesinski
fa7d78ae87 Revert "AssetManager: Cache a pre-filtered list of configurations"
There is a race due to the modification of shared data structures in the framework ResTable.

See b/27499488

This reverts commit d4b169173ad7805369204277580d3942cb08174a.

Change-Id: I3f400a2ad3b5ffc652b84dd5fe777f7cf34b5548
2016-03-07 19:39:56 +00:00
Chris Craik
a98222ae7a Merge "Reject RenderNodes contents when clip is empty" into nyc-dev 2016-03-07 17:43:32 +00:00
Chris Craik
8913c8942f Reject RenderNodes contents when clip is empty
bug:22630332

Change-Id: I326123de3154f655e35d649c242daea3b4f0fda0
2016-03-04 16:28:31 -08:00
Chris Craik
b862f5866f Merge "Support GPU profiling vis in new pipeline" into nyc-dev 2016-03-05 00:19:10 +00:00
Chris Craik
1dfa070496 Support GPU profiling vis in new pipeline
bug:27353099

Change-Id: I905c1a998d9a9e2097c047dab9de87a70d7a370e
2016-03-04 16:18:26 -08:00
Chris Craik
485e41d510 Merge "Revert "Disable HWUI_NEW_OPS"" into nyc-dev 2016-03-04 17:58:37 +00:00
Chris Craik
6f270e062c Merge "Fix clip rect snapping at non-integer scale values" into nyc-dev 2016-03-04 17:54:33 +00:00
Chris Craik
69aeabe618 Fix clip rect snapping at non-integer scale values
bug:26923968

Also removes several reinterprets to ClipRect, since Rect member is in
base class.

Change-Id: If46dbdcea05b1257af185ccb38058735ebe81f79
2016-03-03 16:52:34 -08:00
Chris Craik
4123e53846 Merge "Improve handling of undefined-at-record-time bounds in new ops" into nyc-dev 2016-03-04 00:20:46 +00:00
Roozbeh Pournader
7960898f6f Fix script-related parts of locale resource matching
Previously, a bit was kept to find if the script of a locale was
explicitly "provided" in a resource. This was not backward
compatible, and failed in some edge cases when the package was
created with older versions of AAPT that did not set the bit.

The cases would happen when the old resource had an explicit script
specified in its locale, but since the "provided" bit was not set in
the package, we would assume that the script was computed by us.

This CL replaces the "provided" bit with a "computed" bit, so the
default value of the bit (set to "false" for old packages) would be
correct.

Bug: 27156990
Change-Id: I99e7f1ad8f70c90e25ab3640ed34cc1a6f8d1d64
2016-03-03 15:19:37 -08:00
Chris Craik
a154f47307 Improve handling of undefined-at-record-time bounds in new ops
bug:26591194
Change-Id: Ifc695d285d688903e2ef6aa3f0cb9e7ebf1f68d6
2016-03-03 14:16:31 -08:00
Chris Craik
f0a76088f8 Revert "Disable HWUI_NEW_OPS"
bug:27366026

This reverts commit 0bed032eb2d19c339ecaa89a6e3159c0e2ac98de.

Change-Id: I4d569a11bb2b8db73b9984c50941c78ec5c91fe9
2016-03-03 21:07:54 +00:00
Chris Craik
f6c20e4b42 Fix merged bitmap mesh generation and reenable merging
bug:26793764
bug:26569206
Change-Id: I54628e99b61f58f5726a387ea3599c29695c0efc
2016-03-02 15:34:02 -08:00
Chris Craik
b67985f337 Merge changes I4f72448f,I74b7233c into nyc-dev
* changes:
  Fix ripple positioning within scrolled node
  Clip projected ripples to outlines
2016-03-02 18:52:35 +00:00
Chris Craik
a748c08241 Fix ripple positioning within scrolled node
bug:27275799

Skip applying clip/matrix properties from projected node op, since we
don't want to respect the clip, and matrix is already baked into
transformFromCompositedAncestor.

This skips op clips in the new pipeline, and fixed a double application
of scroll on ripple backgrounds.

Change-Id: I4f72448fe0463ab666564ca538d8b6bf525d98de
2016-03-02 10:48:15 -08:00
Adam Lesinski
1df152284d Merge "AssetManager: Cache a pre-filtered list of configurations" into nyc-dev 2016-03-02 18:32:16 +00:00
Chris Craik
678ff81105 Clip projected ripples to outlines
bug:27343928

Also fixes positioning of ripples to a scrolled projection receiver.

Change-Id: I74b7233c46d7c15839ca8bf50e188ba6646d7432
2016-03-02 10:29:15 -08:00
John Reck
f571c4728a Merge "Only copyLayer if valid rendertarget" into nyc-dev 2016-03-01 00:15:21 +00:00
John Reck
33c025cbfb Only copyLayer if valid rendertarget
Bug: 27407637

Texture layers will set a GL_NONE rendertarget
until they have managed to get the real rendertarget
from SurfaceTexture. If, however, copyLayer is called
prior to any calls to updateTexImage() (for example, if
no frames have yet been produced), this will
result in trying to use a Texture with a GL_NONE rendertarget
which is bad.

Change-Id: Ib7285d799cb94ebd44f07a89f2ef2075d79ef71f
2016-02-29 15:49:41 -08:00
Chris Craik
b878a99f23 Merge "Fix matrix mapping of negative rects" into nyc-dev 2016-02-29 22:02:26 +00:00
Chris Craik
5005033fa3 Merge "Fix arc positioning" into nyc-dev 2016-02-29 22:02:23 +00:00
John Reck
9e066cbf59 Fix dirtyMask in AnimateFunctor
Bug: 27313379
Change-Id: I0c0cffe7e1940914f0143714643ede539b86216f
2016-02-29 13:40:52 -08:00
Chris Craik
0066a01d7c Fix arc positioning
bug:27389290

Change-Id: I479a34ea079f1fce1c308aa809a57885ffa1d004
2016-02-29 13:34:44 -08:00
Chris Craik
261725fdb2 Fix matrix mapping of negative rects
bug:27381362

Also rejects ops with empty clip at record time, and short circuits clip
intersection, when one is empty.

Change-Id: I842612da14ad8fd9f1ba5e9e4fd027ba4e08d365
2016-02-29 13:10:25 -08:00
John Reck
db0fd9dfb2 Merge "Switch to pbuffer surface sooner" into nyc-dev 2016-02-26 23:53:47 +00:00
John Reck
a24b5d4811 Merge "Always swap buffers if using partial update extension" into nyc-dev 2016-02-26 23:53:23 +00:00
John Reck
fc736869ac Switch to pbuffer surface sooner
Bug: 27286867

If the system/app is slow, it might take too long to
stop drawing. Switch the ordering of destroying stuff so
that we switch to the pbuffer surface first, then do
cleanup

Change-Id: If64a3dbb71bb9fd53567231590436a89b2f1a09e
2016-02-26 15:43:09 -08:00
Chris Craik
83b28c0e67 Merge "Clip buffer damage to viewport bounds" into nyc-dev 2016-02-26 23:43:01 +00:00
Chris Craik
64db2bf111 Clip buffer damage to viewport bounds
bug:27287946

Change-Id: Ief3ae9c2dd92196b7d09f1b9fadf009eb228d80a
2016-02-26 15:01:25 -08:00
John Reck
c96955d9bb Always swap buffers if using partial update extension
Bug: 27379093
Change-Id: Ifda18287248e4ae07d4bf2ae9642a9d23039e81f
2016-02-26 14:58:13 -08:00
Doris Liu
14b56a514c DrawVectorDrawableOp for old rendering pipeline
Bug: 27371430
Change-Id: I068d8023812173526ac98d11b903f82e0a66d9c2
2016-02-26 11:39:12 -08:00
Chris Craik
2ebe8fee0c Merge "Properly reject empty unclipped savelayers" into nyc-dev 2016-02-26 01:06:50 +00:00
Chris Craik
4876de16e3 Properly reject empty unclipped savelayers
bug:27225580
bug:27281241

Empty unclipped savelayers (clipped at defer time, often by dirty rect)
were resulting in invalid layer clear rectangles. Simplify by just
rejecting these unclipped savelayers entirely at defer.

Also, use repaint rect as base clip for constructed ops within
LayerBuilder.

Change-Id: I5c466199e85201a2f68f5cdc60b29187c849961b
2016-02-25 16:59:19 -08:00
Adam Lesinski
d4b169173a AssetManager: Cache a pre-filtered list of configurations
When we set the parameters for a ResTable, we can pre-filter which
resources match and only look at that smaller list when getting entries.
This helps A LOT with types that have many configurations, like strings
and all their various locales.

Bug:25499111
Change-Id: Ie6894c44bc67e16a10dbe028c8f3e119e5c29ac7
2016-02-25 15:29:17 -08:00
John Reck
4dfd6c0abc Merge "Disable HWUI_NEW_OPS" into nyc-dev 2016-02-25 23:28:38 +00:00
John Reck
0bed032eb2 Disable HWUI_NEW_OPS
Bug: 27365711

Change-Id: Ife7ecc7c688738df4028f30847a2ff914e433b99
2016-02-25 15:03:48 -08:00
Chris Craik
dc32185b92 Merge "Cleanup vertex attrib management" into nyc-dev 2016-02-25 17:31:47 +00:00
Chris Craik
1b7db4000e Cleanup vertex attrib management
bug:27289007

Also removes unused code in MeshState

Change-Id: I46116631111cc82e1cdffb5706344bbb6d4c6600
2016-02-24 18:33:41 -08:00
John Reck
f3ad324a8d Aggressively unbind GL_PIXEL_UNPACK_BUFFER
Bug: 27186019

Theory: It appears to be possible for FontRenderer
to not unbind its PBO prior to textures being uploaded,
resulting in trying to glSubTexImage2D with a bound
GL_PIXEL_UNPACK_BUFFER. In that scenario the void* is
the offset into the PBO which given a non-null data
will almost certainly overrun the end of the buffer. This
in turn produces a GL_INVALID_OPERATION error.

Change PixelBuffer to avoid leaking this state for now.
This will result in more calls to glBindBuffer/glUnbindBuffer
in the worst case, but the worst case is already bad so this
shouldn't be a problem. In the normal case we avoid binding
the PBO at all ever, so this doesn't impact that.

Change-Id: I05473f0d2f9a3a5da0e33d8f9ddea4731ce970e3
2016-02-24 15:40:05 -08:00
Chris Craik
388e43f419 Merge "Fix drawColor/drawPaint bounds" into nyc-dev 2016-02-23 23:33:53 +00:00
Chris Craik
91eff22b5d Support op dumping in new pipeline
bug:26565102

Change-Id: I266e420a2f18ba9ad62942b8a0de295dfa3a2a88
2016-02-23 18:52:54 +00:00
Chris Craik
cf1f7304ca Merge "Fix positioning in path fallback case" into nyc-dev 2016-02-23 00:54:29 +00:00
Chris Craik
e2822e4c79 Fix positioning in path fallback case
bug:26923968
Change-Id: Iaf686fb69b629cf5c8762188073e57c8664150a8
2016-02-22 16:42:24 -08:00
Chris Craik
339fc0a1d2 Merge "Add create_trivial_array" into nyc-dev 2016-02-22 21:40:58 +00:00
Doris Liu
045e5a78a2 Merge "Ensure animator's interpolator is set" into nyc-dev 2016-02-22 18:08:07 +00:00
Doris Liu
148f57fc26 Ensure animator's interpolator is set
Animator's play state can go from NotStarted to Finished directly
in the case of calling start() and end() within one frame. Previously
we only set animator's interpolator when the animator is transitioning
to Running state. So when Running state is skipped, the interpolator
is left unset.

Bug: 27224373
Change-Id: I5a53106fe1aae38ccaf1df8debd553be3bc56133
2016-02-19 17:19:24 -08:00
Chris Craik
1fd5f379d7 Merge "Support drawing circles with drawArc in new pipeline" into nyc-dev 2016-02-20 00:18:15 +00:00