130 Commits

Author SHA1 Message Date
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
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
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
Chris Craik
b878a99f23 Merge "Fix matrix mapping of negative rects" into nyc-dev 2016-02-29 22:02:26 +00: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
64db2bf111 Clip buffer damage to viewport bounds
bug:27287946

Change-Id: Ief3ae9c2dd92196b7d09f1b9fadf009eb228d80a
2016-02-26 15:01:25 -08: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
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
1fd5f379d7 Merge "Support drawing circles with drawArc in new pipeline" into nyc-dev 2016-02-20 00:18:15 +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
1bc4ee4506 Cleanup cached state in TestUtils::runOnRenderThread
Change-Id: I097217c80db5c509d97ef050633946110fccbc80
2016-02-19 15:57:45 -08:00
Chris Craik
1713c7773c Fix drawColor/drawPaint bounds
bug:26591194

Change-Id: Icda9b6e6cdd0c12a10e06469ace02b4a89df044b
2016-02-18 17:49:46 -08:00
Andres Morales
11f02d7e52 allow for slow FrameMetricsListeners
A slow listener could cause a race in the NotifyHandler
where the single reference to the buffer to send would get
updated when it shouldn't have been.

Switch to a queue of available buffers to prevent this race.

Also, stop setting and clearing the observer reference and instead
incStrong/decStrong to mark temporary strong ownership without
colliding with other owners in flight.

Bug: 27097094
Change-Id: Iee647bfae8b80019b6d8290179eed3973230901f
2016-02-17 12:16:06 -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
Chris Craik
b4f4f3e16d Calculate clip bounds correctly when serializing
bug:26585671

Change-Id: Ic70769bce6fa2a7b65cb893ba4a45c65fdc0b7e3
2016-02-09 01:27:56 +00:00
Chris Craik
b251a2f51e Revert "Revert "TaskManager bench""
This reverts commit 9640477e3cc075b0f303e817a3ebcc72d7bc878b.

Change-Id: I3aa8f2830b43b9c7b211c5792a311d0bc698c51a
2016-02-08 23:28:28 +00:00
Chris Craik
e8c3c813b0 Fix TextDropShadowCacheTests and glyph_t everywhere
Change-Id: I943eae4e9408c77bdfba6304ba7ee3e862351a41
2016-02-08 22:45:22 +00:00
Chris Craik
62cd9e4a72 Fix build
Change-Id: I1ad30ae50cbdff9267d0121a446e6adbe3ad17ee
2016-02-05 18:17:35 -08:00
John Reck
83c9b5bf63 Add a debug assert to track down infinite loop
Bug: 26980851
Change-Id: I326983ab367782048311b6cf06d800f72837e38e
2016-02-05 13:03:47 -08:00
Daniel Chapin
9640477e3c Revert "TaskManager bench"
This reverts commit 02db03ca0584371504fd29ced77c00d601cb0971.

Change-Id: I86bdf5e6774e99f9add59a657bfc50d45ebfda1d
2016-02-05 05:42:16 +00:00
Chris Craik
02db03ca05 TaskManager bench
bug:26964750

Change-Id: Ibda0cd2e5e64331a4367d4985d6acfd6f3baeda1
2016-02-04 14:42:43 -08:00
Chris Craik
37fd29f284 Merge "Fix ripple clipping + quick rejection" 2016-02-04 19:08:59 +00:00
Chris Craik
3fd03b718d Merge "Add SkiaBehaviorTests" 2016-02-04 18:08:20 +00:00
Chris Craik
7fc1b0349b Fix ripple clipping + quick rejection
bug:26524690

Don't intersect the first clip with the viewport. Instead, the first
clip op should always be a replace op.

Additionally, only quick reject nodes that clip to bounds, since some
nodes (like ripples) draw outside their own bounds.

Change-Id: I96a52029f360328aba19af7349888cc0a026b5b1
2016-02-03 20:09:00 -08:00
Chris Craik
07d8d59e21 Add SkiaBehaviorTests
Change-Id: Ie2983f7a0c9e8bdd8c8de507d70ecf3aefdd9425
2016-02-03 18:43:04 -08:00
Chris Craik
fdbc795e48 Merge "Remove unnecessary fence in macrobench" 2016-02-04 01:43:40 +00:00
Chris Craik
2705c983f5 Remove unnecessary fence in macrobench
bug:26882579

Change-Id: Ic2d610b5ae7e04513dc7f7fa99d355d406a73379
2016-02-03 17:39:41 -08: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
Chris Craik
6e068c0182 Early kickoff of shadow tasks
bug:26562703

Change-Id: I7cdf18f2c662380bd31c7ffeefd5c3f569e5c1c6
2016-02-02 17:10:25 -08:00
John Reck
c3127a78b9 Fix TextDropShadowCache infinite loop
Bug: 26862239

Switch TextDropCacheShadow to use the tracked objectSize()
instead of the optional bitmapSize. A mismatch here
results in ::get() infinite looping trying to free space in
the cache since the LRU removal callback would always
decrement mSize by 0 since bitmapSize was not being set.

Also prevent the infinite loop in the future by crashing if
this scenario happens again.

Change-Id: Ib4e9fbe1c8327af2335ad650fd694a1627d9824f
2016-01-29 16:26:35 -08:00
John Reck
c9fd313f94 Merge "Fix tests" 2016-01-26 18:59:27 +00:00
John Reck
65182ccffc Fix tests
Disable FrameBuilder.clippedMerging as it relies on
merged bitmap ops which was disabled in b/26793764

Fix Buffer to correctly initialize mRefs count

Change-Id: I87d2fcc690a2ae14eaf751f650f522be5b622edf
2016-01-26 10:50:10 -08:00
Florin Malita
dd93728b46 Merge "Add internal Canvas save flags" 2016-01-26 17:00:37 +00:00
John Reck
c52ac0b9e2 Merge "Add fine-grained debug layer" 2016-01-26 15:21:07 +00:00
John Reck
975591a7af Add fine-grained debug layer
Full GLES error checking layer via -include
trickery. Change DEBUG_OPENGL to a level system.

HIGH = every GL call is error checked
MODERATE = checkpointing at interesting spots
LOW = only asserts there are no errors at the end of a frame
 or when the FBO changes
NONE = AIN'T GOT NO TIME FOR ERRORS GOTTA GO FAST!

Change-Id: Ibe81aae93d942059c4ddf1cbb11c828b7ce4c10b
2016-01-25 16:15:14 -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
Andres Morales
06f5bc70a6 expose hwui frame stats through FrameStatsObserver
Change-Id: I88884bafc8e2f6d7f67a36d3609490e83cf8afd5
2016-01-22 12:58:51 -08:00
John Reck
7d569db936 Merge "Hard-abort tests if LOG_ALWAYS_FATAL" 2016-01-19 15:38:16 +00:00
John Reck
f1dafb5962 Hard-abort tests if LOG_ALWAYS_FATAL
Bug: 26591625

Also fixes it so debuggerd runs and we get stacks

Change-Id: I55b376e6a4e12ddcd21fa251fbfe5bd521fc0985
2016-01-15 16:58:23 -08:00
John Reck
7db5ffb7db Revert "Revert "Fix leak in unclipped save layer""
This reverts commit a6fc36d4cd7f27147fd304960acdd1d2f47fc1c6.

Change-Id: I6b96afe4a32dc894d5b17cfb870b45063257aed2
2016-01-15 13:59:37 -08:00
Daniel Chapin
a6fc36d4cd Revert "Fix leak in unclipped save layer"
This reverts commit 8e068d5fd38dd103a122215fb6d185135182edf3.

Change-Id: Icd8ad5a2450db34aacecf748d6103df9faaa4c81
2016-01-15 03:02:58 +00:00
John Reck
8e068d5fd3 Fix leak in unclipped save layer
Change-Id: I31f146af2cb6f5cb8dd19bb0feff0ae35b864eba
2016-01-14 16:28:28 -08:00
John Reck
00159554e0 Fix leak in OffscreenBufferPoolTests
Change-Id: Ic16df75bdc01d902639df98bc6798d9383510342
2016-01-14 14:47:07 -08:00
John Reck
cbc5bd57f0 Merge "Track texture memory globally" 2016-01-14 21:49:42 +00:00
John Reck
e5da4ef971 Trap SIGABRT in RenderThread for unit tests
Change-Id: Icc1039543d975497808a8062e9d909537c4a29c9
2016-01-14 13:43:55 -08:00