68 Commits

Author SHA1 Message Date
sergeyv
98fa4f9e7b Use Bitmap in Texture.upload
Test: refactoring cl.
bug:32216791

Change-Id: Ib0b16c878d8371e0471e9a502f55626ec5999c60
2016-10-26 13:57:38 -07:00
sergeyv
ec4a4b13ea Use Bitmap in DisplayList & RecordedOps instead of SkBitmap
Test: refactoring cl.
bug:32216791

Change-Id: I1d8a9a6e772e2176b6c2409409a910478b45f8db
2016-10-21 12:11:44 -07:00
sergeyv
5fd2a1cb27 Pass Bitmap instead of SkBitmap in drawNinePatch & drawBitmapMesh
Test: refactoring cl.
bug:32216791

Change-Id: I5adcd59daf752d36012456b0a9960c59d07e2e3d
2016-10-20 15:04:28 -07:00
sergeyv
fc9999505a Pass Bitmap instead of SkBitmap for bitmap rect operation
Test: refactoring cl.
bug:32216791

Change-Id: I66d19194c57b3aa2c400aa87acffc774a533776a
2016-10-20 14:04:35 -07:00
sergeyv
aed7f58fb0 Pass Bitmap instead of SkBitmap in canvas.drawBitmap(Bitmap, float,float,Paint)
Test: refactoring cl.
bug:32216791

Change-Id: If9f9fbc19e683b14cce6c3c268258bd832d495d2
2016-10-20 09:50:49 -07:00
TreeHugger Robot
0154feef22 Merge "Initial refactoring to enable reuse of SkiaDisplayList on a per RenderNode basis. With Skia renderer we see 30% speed improvement in Invalidate Tree UI Jank test, when SkiaDisplayList objects are reused." 2016-10-19 20:36:00 +00:00
Stan Iliev
c0e7a90f1f Initial refactoring to enable reuse of SkiaDisplayList
on a per RenderNode basis. With Skia renderer we
see 30% speed improvement in Invalidate Tree UI Jank test,
when SkiaDisplayList objects are reused.

Test: manually built and run on angler-eng.
Change-Id: Ie4ec50ddb2015150e3ec678dde7ebed0c8d90067
2016-10-17 16:30:28 -04:00
Mike Reed
260ab72648 use SkBlendMode instead of SkXfermode
use sk_sp versions of paint setters/getters

Change-Id: I86591a0a8ec92e6039776cbf00424ea24f585b28
2016-10-13 17:14:52 -04:00
Chris Craik
97ec95c212 Prevent EndLayerOps when Begin was rejected am: 3c53ec51ef am: 152f76ee50
am: 674965822b

Change-Id: Icfa8cb2ad7c97fdbbf37f01abe7b5a22f6b33cfd
2016-08-09 00:20:12 +00:00
Chris Craik
3c53ec51ef Prevent EndLayerOps when Begin was rejected
bug:30537130

BeginLayerOps were being rejected in a way that allowed the associated
EndLayerOps to still be recorded. This was a violation of DisplayList
content expectations, and caused crashes in FrameBuilder when trying to
play these DisplayLists back.

Change-Id: I531b840aa5c4ffb1ee458da3f4b366978eaeafbe
2016-08-08 15:15:58 -07:00
Chris Craik
919645aded Reject fully transparent paint-fill ops at record time am: 814ee6a921
am: 1cfc4b1f46

Change-Id: I0d04b00ccf3d109ea5ab55ba52122fd4506147ea
2016-07-27 21:34:09 +00:00
Chris Craik
814ee6a921 Reject fully transparent paint-fill ops at record time
bug:30342762

Avoids unnecessary work for each transparent operation.

Change-Id: I80b1eeca34ae32249433fde55e9fe93d02c411db
2016-07-26 16:22:51 -07:00
Yuqian Li
afc221499d More efficient text rendering on path
Change-Id: I004c15473b527df0f296c54a6a3e9b29505fd9b9
2016-07-25 13:44:14 -04:00
Chris Craik
5e00c7ce06 Delete old rendering pipeline
fixes: 30002246

Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
2016-07-07 15:53:50 -07:00
Chris Craik
e4f6d968f5 Fix savelayer rounding
bug:29456451

Change-Id: I8022163d2c004510da5db74efdca27582484224d
2016-06-28 09:53:04 -07:00
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
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
Chris Craik
d645640180 Apply clip at reorder barriers to shadows
Fixes: 28004930

Change-Id: I208b78430c770a3135afd68c53cf8ff3fba50c52
2016-04-11 12:32:41 -07: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
aafb01d8ad Consume TextureView matrix safely
Fixes: 27825042

TextureView's matrix may not be set at record time - delay using it
until on RenderThread, when deferring the op.

Change-Id: Icf8b55d656e304ec049ca803b042dc2359482db2
2016-03-28 10:12:37 -07:00
Chris Craik
a204848b1d Create first class unbounded ColorOp
bug:27810783

Previous drawColor->drawPaint conversion failed to preserve unbounded
nature of drawColor from old pipeline.

Change-Id: Ifd7a7b9d645f0887e252e48ca95d3195ee31615f
2016-03-25 15:13:23 -07:00
John Reck
417ed6d433 Fix missing first frame
Bug: 26776366
Change-Id: I46258c0ff35fdefe5c9f2ee610c904b2dbe8c5d9
2016-03-23 07:59:10 -07:00
sergeyv
dccca44ffd Reland: Move text logic from jni to hwui level
Initial CL: https://googleplex-android-review.git.corp.google.com/#/c/886854/

Change-Id: I9dfd85fe1d2a2c44f4360c8a29fd58d80e6f31c8
2016-03-21 15:55:46 -07:00
Sergei Vasilinetc
6847953955 Merge "Revert "Move text logic from jni to hwui level"" into nyc-dev 2016-03-21 21:06:47 +00:00
Sergei Vasilinetc
afbd0f1fef Revert "Move text logic from jni to hwui level"
This reverts commit a7f6bba1a3565c19715e878dfe7f0e01022944ff.

Change-Id: If4f36f87a85411b6128fd92d391313803ccaf9dd
2016-03-21 21:03:40 +00:00
Sergei Vasilinetc
49658d4380 Merge "Move text logic from jni to hwui level" into nyc-dev 2016-03-21 20:11:27 +00:00
Chris Craik
4c3980b6e4 Handle unbounded drawPaint/drawGLFunction operations safely
bug:26591194

Also, revert to using current clip bounds as drawColor/drawPaint bounds
for simplicity in new pipeline.

Change-Id: I1a6b3f9716b564b46df41d57dfe14475fdd24de0
2016-03-18 16:16:38 -07:00
sergeyv
a7f6bba1a3 Move text logic from jni to hwui level
bug:25865834
Change-Id: I2d8c9c9544afcb5ce1784f732aed3e54e0eda372
2016-03-17 09:48:57 -07:00
Chris Craik
2dbb4c46ee Unrounded round rects are just rects
Change-Id: I66517390943192e4725251b316a3d8c332c2b77d
2016-03-14 15:58:44 -07:00
Chris Craik
e83cca3a3a Merge "Fix node rejection crash" into nyc-dev 2016-03-10 23:45:20 +00:00
Chris Craik
1367d2550e Fix node rejection crash
bug:27598131
Change-Id: Iea05c22ec10f92beef9c47236929eb5f860d84f9
2016-03-10 15:43:13 -08:00
Chris Craik
223e3b6c2b Fix WebView disappearing
bug:27528563

Change-Id: Ib9fefa18ef9fb8eb11edd097cbadf8ab2b911576
2016-03-10 10:49:45 -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
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
Chris Craik
388e43f419 Merge "Fix drawColor/drawPaint bounds" into nyc-dev 2016-02-23 23:33:53 +00:00
Chris Craik
339fc0a1d2 Merge "Add create_trivial_array" into nyc-dev 2016-02-22 21:40:58 +00:00
Chris Craik
caa2418473 Support drawing circles with drawArc in new pipeline
bug:26764636

Change-Id: I37d2384fa5e6c1074bb8de85821d58c15659b762
2016-02-19 16:12:53 -08:00
Chris Craik
7a89600bac Add create_trivial_array
Change-Id: I5e4236ff59fdaceb95105c5590f4deeda6d0b4c8
2016-02-19 15:51:02 -08:00
Chris Craik
1713c7773c Fix drawColor/drawPaint bounds
bug:26591194

Change-Id: Icda9b6e6cdd0c12a10e06469ace02b4a89df044b
2016-02-18 17:49:46 -08:00
John Reck
7df9ff2a08 Fix all LA memory leaks forever!
Bug: 27072626

Or at least fix this one and make it harder to leak
going forward. static_asserts are cool, use them liberally

Also makes allocation via LA (slightly) faster by fixing create*
variants to use rvalue references & std::forward, preventing
an accidental pass-by-value

Change-Id: I18fd696a93dd6ea49c8d8c587d4c8bee56dbfdf5
2016-02-11 00:42:23 +00:00
John Reck
e537330ead Revert "Fix all LA memory leaks forever!"
This reverts commit 499d83f21e7ffb687788bba1668b05fe38f6ebaf.

Change-Id: Ia893ae16ebbeae68e49cd13a20587104b73d39a0
2016-02-11 00:36:34 +00:00
John Reck
499d83f21e Fix all LA memory leaks forever!
Bug: 27072626

Or at least fix this one and make it harder to leak
going forward. static_asserts are cool, use them liberally

Also makes allocation via LA (slightly) faster by fixing create*
variants to use rvalue references & std::forward, preventing
an accidental pass-by-value

Change-Id: I5e0e36e72c6dd93324194ebf9a95f8204f05f261
2016-02-10 16:11:26 -08:00
Doris Liu
766431aa57 Revert "Revert "VectorDrawable native rendering - Step 4 of MANY""
This reverts commit 5a11e8d0ba21624025b89ac63bbd18befa55be0e.

Change-Id: I7a48b59c4f930dad65ddc8590c25a12636244ea2
2016-02-04 16:29:51 -08:00
Doris Liu
5a11e8d0ba Revert "VectorDrawable native rendering - Step 4 of MANY"
b/26949340 and b/26975469, b/26975079 as well 

This reverts commit f276acd98457bcaabc9e79a17a736b3b484f005e.

Change-Id: I4b55177daf0d289bc03604c71fd4bf579f65073a
2016-02-04 20:59:00 +00:00
Derek Sollenberger
6f485569fa Update Canvas API with view system calls.
Refactor DisplayListCanvas, RecordingCanvas, and SkiaCanvas
to share a common API.

Change-Id: I0268ec2749ea5d13a3a72bb2784ed6a9911383d9
2016-02-03 09:13:04 -05:00
Doris Liu
f276acd984 VectorDrawable native rendering - Step 4 of MANY
This CL runs VectorDrawable animation on RenderThread. The changes in this CL
include:
- Convert all the animators in AnimatorSet for AVD into a set of RenderNodeAnimators.
- Hook up the new animators with RenderThread
- Add drawOp in RecordingCanvas for drawing VD so that during the animation
  on RenderThread, all the property changes on VD can be reflected on the screen.

TODO:
- Implement reverse and reset for AVD.

Change-Id: I2df1d754f2db0ad098d9c15dde4bb2bdfafc2315
2016-02-02 15:04:01 -08:00
Florin Malita
eecff56fed Add internal Canvas save flags
Skia's SkCanvas::SaveFlags are being deprecated.  This CL introduces
the equivalent android::SaveFlags, converts all internal clients to
the new enum, and switches the saveLayer glue to the
SaveLayerRec-based API.

Change-Id: Icb1785f4e7c0f652b1f04b34a1e3ccb063c408f3
2016-01-25 15:48:00 -05:00
Chris Craik
b87eadda18 Partial unclipped save layer support
Not yet implemented in renderer.

Change-Id: I491ec6e7886bfa313d1db71dd5981690d45b78a9
2016-01-07 15:42:45 -08:00
Chris Craik
e4db79de12 Stencil support in new recorder/reorderer
bug:22480459
bug:26358504

Adds complex (non-rectangular) clipping support, and overdraw
visualization. Doesn't support stencil clipping in layers.

Change-Id: I8d10c7f1d2769ab5756774ca672344cc09901f87
2016-01-04 17:00:03 -08:00
Chris Craik
d2dfd8f128 Add TextureView support to new renderer/reorderer
bug:22480459

Change-Id: I2e4c0bc6b904706132f3f5087ededc9cac9b40fb
2015-12-16 15:35:40 -08:00