6971 Commits

Author SHA1 Message Date
Doris Liu
e49954a7f7 Merge "Add microbench for PathParser" 2015-11-11 00:44:57 +00:00
Doris Liu
f59cb788ba Add microbench for PathParser
Change-Id: I95d6c3153480e3ea56032ffe73707110186fbb0f
2015-11-10 16:43:16 -08:00
Doris Liu
bec5a907dd Merge "VectorDrawable native rendering - Step 1 of MANY" 2015-11-11 00:36:27 +00:00
Doris Liu
30bcf69df9 VectorDrawable native rendering - Step 1 of MANY
Implement path parsing from string to skia path in native. The parsing
contains two main stages:
1) Parse string into a list of nodes that contains one operation (such
   as move) and a vector of floats as params for that operation.
2) Interpret the operations defined in the nodes into SkPath operations,
   and create a skia path

Also provided unit test for parsing a string path into a list of nodes,
and then to a skia path.

Change-Id: I0ce13df5e3bb90987dcdc80fe8b039af175ad2e2
2015-11-10 15:46:06 -08:00
John Reck
9557dcd53b Merge "Fix HWUI Path Cache dangling pointer" am: 37bf3ec9d2 am: 7516d4d866
am: 1b85ce17a3

* commit '1b85ce17a316973a170b3932f2d0a9b02063eaa3':
  Fix HWUI Path Cache dangling pointer
2015-11-10 23:36:27 +00:00
John Reck
1b85ce17a3 Merge "Fix HWUI Path Cache dangling pointer" am: 37bf3ec9d2
am: 7516d4d866

* commit '7516d4d8667957688433b02b2f4985f1b3ab36ad':
  Fix HWUI Path Cache dangling pointer
2015-11-10 23:31:11 +00:00
John Reck
37bf3ec9d2 Merge "Fix HWUI Path Cache dangling pointer" 2015-11-10 23:20:03 +00:00
John Reck
e2703bee8a Merge "Fix threading issues" 2015-11-10 21:41:49 +00:00
John Reck
cba287b971 Fix threading issues
Bug: 25584167
Change-Id: I413ef9e0c86f7cca1f7d085e0071745ca0192853
2015-11-10 13:41:32 -08:00
Florin Malita
dd763feeb2 Merge "Fix persistent Canvas clip handling" 2015-11-10 16:59:48 +00:00
Digish Pandya
2e4f67c388 Fix HWUI Path Cache dangling pointer
When precache, PathTexture is added to PathCache, and it is released after drawn if we want to clean it.
But the PathCache LRU still holds the entry of the PathTexture object. When trim the cache in
the end of each frame, LRU finds that its mListener is not NULL and invoke the functor, however,
mListerer points to the released PathTexture object and is a dangling pointer, thus leads to crash.
Smart pointer don't help here since they only manage scopes, while PathTexture is also controled by
its cleanup field.
The fix is to also remove the LRU entry of PathTexture*, it will also release the texture object
and there won't be texture leaks.

Change-Id: Iaa0621df5dc71532e9e75b38ad94384353930b95
2015-11-09 14:22:25 +05:30
Tao Bai
788f7433bd Merge "Add test to cover loading shared-lib with appAsLib as true. This patch made AppAsLib_test use its own resource" 2015-11-06 23:49:40 +00:00
Tao Bai
1375e5f180 Add test to cover loading shared-lib with appAsLib as true.
This patch made AppAsLib_test use its own resource

Bug 22487604

Change-Id: Iac4cc949f1b25c326a287a49e0b031bf6831e9e9
2015-11-06 14:33:49 -08:00
Florin Malita
5e27140f48 Fix persistent Canvas clip handling
Partial Canvas save semantics (clip or matrix persisting after restore)
are currently emulated in the native canvas wrapper (SkiaCanvas.cpp).

Persistent clips (save w/ MATRIX_SAVE_FLAG only) in particular are
emulated using the SkCanvas clip stack.  There are two problems with
the current implementation:

1) The canvas save count is used to identify the clip stack topmost
frame, on the assumption that it is the same as the actual clip stack
save count.  But with the introduction of lazy SkCanvas saves in Skia,
the two values can diverge: the clip stack save count only reflects
*committed* saves, while the canvas save count includes both committed
and pending saves.  This means that we can no longer compare canvas and
clip stack save counts directly.

While we're looking at addressing the save count discrepancy in Skia
proper, we can also refactor the partial save emulation to no longer
rely on the two values being synchronized: instead of using the canvas
save count to locate the top clip stack frame, simply use the clip
stack save count for the same purpose - getClipStack()->getSaveCount()
always points to the correct top clip stack frame.

With this patch:

  * we use SkCanvas::getSaveCount() to track *canvas* save frames which
      require persistent matrix/clip handling (mSaveRecStack)
  * we use SkClipStack::getSaveCount() to extract the clips from the
    top clip stack frame

Also, since we're no longer mixing/comparing the two save counts, we
don't have to decrement the canvas value anymore (to make it zero-based
like its clip stack counterpart).

2) When iterating over clip stack elements, we currently start at
kTopIterStart and advance using next().  This is incorrect as next()
moves up the stack, so we only iterate over the topmost element =>
if there are multiple (non-consolidated) clip elements in the top
frame, we only get to see one.

We need to iterate using prev() instead.

Change-Id: Ic2d8cad684018925e749b9172fbf7c6202d9fb62
2015-11-06 18:40:25 +00:00
Teng-Hui Zhu
83ea5b7b22 When the incoming light source is invalid, don't generate any shadow
b/25417885

Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507
2015-11-05 15:48:35 -08:00
Chris Craik
161f54b2d4 Add z-reordering support to OpReorderer
Change-Id: I3fa969fe53cf648d145810f69fa7dada376c0b9a
2015-11-05 15:45:59 -08:00
Chris Craik
679f9863f9 Merge "Add more RenderNode property support in OpReorderer path" 2015-11-05 23:32:30 +00:00
Chris Craik
76caecf421 Add more RenderNode property support in OpReorderer path
Change-Id: I0163fe91d8145e33019739c191bbab0432a5f9aa
2015-11-05 15:25:12 -08:00
Colin Cross
290b23a1e1 Fix build
std::abs requires <cstdlib>

Change-Id: I0722340d17aed88c4c8dabcb723d432b05cebedb
2015-11-05 22:15:18 +00:00
Tenghui Zhu
7fa281c80f Merge "When the incoming light source is invalid, don\'t generate any shadow" into mnc-dr-dev am: 76d20b4a5c am: 1c7fbe0efb am: d829ab7683
am: dfaf23f846

* commit 'dfaf23f84669b2f45da892f49b2d8c07f161f7a2':
  When the incoming light source is invalid, don't generate any shadow
2015-11-05 21:18:00 +00:00
Chris Craik
1c3dd0519a Merge "Revert "Remove -ffast-math from libhwui makefile"" into mnc-dr-dev am: 0cf48e9120 am: 17fc83cbde
am: c06ccd77c1

* commit 'c06ccd77c129cdf198c64babdfd8d289aa8ff908':
  Revert "Remove -ffast-math from libhwui makefile"
2015-11-05 20:37:23 +00:00
Tenghui Zhu
dfaf23f846 Merge "When the incoming light source is invalid, don\'t generate any shadow" into mnc-dr-dev am: 76d20b4a5c am: 1c7fbe0efb
am: d829ab7683

* commit 'd829ab76831a0c323f669385c54f666f8a91e4f1':
  When the incoming light source is invalid, don't generate any shadow
2015-11-05 20:27:43 +00:00
Chris Craik
0cf48e9120 Merge "Revert "Remove -ffast-math from libhwui makefile"" into mnc-dr-dev 2015-11-05 20:21:45 +00:00
Tenghui Zhu
76d20b4a5c Merge "When the incoming light source is invalid, don't generate any shadow" into mnc-dr-dev 2015-11-05 20:05:37 +00:00
John Reck
704bed0da7 add DeviceInfo
This reverts commit 096895550b9d5430d7a001d491566decf4f9791b.

Change-Id: Ib2ed1e96d8f7f88302f5e27fe735687194553104
2015-11-05 10:13:23 -08:00
Chris Craik
e0fa7476a5 Revert "Remove -ffast-math from libhwui makefile"
This reverts commit e02ec7c37a92fd63748a610bac6a23d0409788cf.

Change-Id: Iea7fadf04c4ffa62be28f783342ae749f89bf931
2015-11-05 17:58:28 +00:00
John Reck
41925b1ccd Merge "Revert "add DeviceInfo"" 2015-11-05 01:39:37 +00:00
John Reck
096895550b Revert "add DeviceInfo"
This reverts commit b2442896e3a226c7ebe9d47fa80b257e98a6a34d.

Change-Id: I50f6555451f71067505245333c8e558b5e3b2b3b
2015-11-05 01:38:25 +00:00
Teng-Hui Zhu
cf22d184a3 When the incoming light source is invalid, don't generate any shadow
b/25417885

Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507
2015-11-04 17:04:18 -08:00
John Reck
5655c7cdd3 Merge "add DeviceInfo" 2015-11-04 21:50:36 +00:00
John Reck
b2442896e3 add DeviceInfo
Change-Id: I4c122278a7e88b6f47c4dd3c5fc553df7d3c900d
2015-11-04 13:46:49 -08:00
Chris Craik
34e9b5b2e4 Merge "Early return when the scale is 0." into mnc-dr-dev am: 10eb6ab94b am: 8b581e2bc7
am: a853bb450c

* commit 'a853bb450ce7e6f06220a86dcc171a837d30511b':
  Early return when the scale is 0.
2015-11-04 19:46:47 +00:00
Chris Craik
289c3ba2c4 Merge "Remove -ffast-math from libhwui makefile" into mnc-dr-dev am: c4aaf0f4b8 am: 62b16e2e10
am: 1938c39f77

* commit '1938c39f77a52c1058e7b2434bdc5d08ed9053b9':
  Remove -ffast-math from libhwui makefile
2015-11-04 19:40:04 +00:00
Chris Craik
10eb6ab94b Merge "Early return when the scale is 0." into mnc-dr-dev 2015-11-04 19:28:39 +00:00
Teng-Hui Zhu
cdce35a7e8 Early return when the scale is 0.
b/24534579

Change-Id: Ib3581ec99387ca70ca036026f64857a49657d94b
(cherry picked from commit 8d0ec389531d071529fb0a800f10733b057205d9)
2015-11-04 18:31:50 +00:00
John Reck
392b0926aa Merge "Revert "Use clang for libhwui"" into mnc-dr-dev am: 1e1fbd804b am: f8635c2e04
am: 26f50df754

* commit '26f50df75477a18e40c6da59a15cc2bd4b441239':
  Revert "Use clang for libhwui"
2015-11-04 18:21:35 +00:00
Chris Craik
e02ec7c37a Remove -ffast-math from libhwui makefile
bug:25417885

Change-Id: I8244bd28c2d46fc449398b9bf5104bf7cbaded8a
2015-11-04 10:14:57 -08:00
John Reck
967bb181c1 Merge "Fix GCC build" 2015-11-04 17:24:07 +00:00
John Reck
c90ed759cf Fix GCC build
Change-Id: I990993b8b751bdaf41ce4db1aa7e28823f296777
2015-11-04 07:39:44 -08:00
John Reck
492a56cc93 Revert "Use clang for libhwui"
Bug 25462107

This reverts commit d354fd2c66855d116440eb4c936317f124241225.

Change-Id: Ib7c50b5becf247f837f3cc20f9128d9411d22563
2015-11-04 15:21:35 +00:00
Tenghui Zhu
0cda530e0e Merge "Use clang for libhwui" into mnc-dr-dev am: 61c93eb16d am: a66dc6e159
am: a32f221db0

* commit 'a32f221db0361c9047fd61373fbf815c37d958f8':
  Use clang for libhwui
2015-11-03 19:55:52 +00:00
Chris Craik
d354fd2c66 Use clang for libhwui
bug:25417885

Change-Id: I0ef8034d79ba3682925e3c2a4b7ccd833fd4f156
2015-11-03 10:34:28 -08:00
John Reck
b4e228918e Merge "Remove almost-all android::Singleton users" 2015-11-03 18:19:15 +00:00
John Reck
6b50780363 Remove almost-all android::Singleton users
Bug: 25426213
Change-Id: I88e6206e8915cce95c3a8a8a82a4bb8fbf668141
2015-11-03 10:09:59 -08:00
Chris Craik
3ebc155c40 Merge "Add unit test failure messages to recordingcanvas/reorderer" 2015-11-03 17:26:34 +00:00
Chris Craik
a6ac95e577 Add unit test failure messages to recordingcanvas/reorderer
Change-Id: I3be7f096cdfb4eb66063c7e4d50f5bd859f43fbd
2015-11-02 18:06:59 -08:00
Chris Craik
8d2cf943d9 Add region-tracking to OffscreenBuffers
Change-Id: I024c7219c080b9a89888517f5a89d49dfe8065ba
2015-11-02 17:34:06 -08:00
Chris Craik
2359d85e31 Merge "Initial HW layer support in new reorderer/renderer" 2015-11-02 21:16:37 +00:00
Chris Craik
0b7e8245db Initial HW layer support in new reorderer/renderer
Shares vast majority of clipped savelayer code, with only minor
differences in lifecycle.

Doesn't yet handle fill region, resize, or window transform.

Change-Id: Iabdd71811590d2b937eb11e1b01ce556ade54a5a
2015-11-02 12:59:38 -08:00
Rob Carr
b97ba3c09d Merge "Add window setDecorView API." 2015-10-30 20:55:35 +00:00