6985 Commits

Author SHA1 Message Date
Christopher Ferris
676a67bd4e Merge "Fix bug where mExtensions was not initialized." 2015-11-14 07:14:45 +00:00
Christopher Ferris
be4d8ddf1d Fix bug where mExtensions was not initialized.
Recent changes to mExtensions moved the initialization code from the
constructor to a separate function called load. Make sure to call
this function in the initExtensions function call.

Bug: 25615666

Change-Id: Ic016232c42afefd3b5bc3e4bd5c8428a11c454ad
2015-11-13 20:10:17 -08:00
Chris Craik
4bc507851c Merge "Add error check for float parsing and fix tests" 2015-11-14 00:00:05 +00:00
Doris Liu
1e67f08963 Add error check for float parsing and fix tests
Change-Id: Ia4f4863d415536b3796edbcdb83c951b6cff02cf
2015-11-13 15:58:49 -08:00
Chris Craik
9fded232a9 Recycle OffscreenBuffers
Change-Id: Ia2e219026f211a5308ecf8209c5f986bb888aadd
2015-11-12 13:05:35 -08:00
Doris Liu
ec99ff6cd7 Merge "Use array instead of vector for test data set" 2015-11-12 18:40:54 +00:00
Doris Liu
b89610c0c9 Use array instead of vector for test data set
Change-Id: I1d3e94c52b8bf0842c21132507b5f55a136a255b
2015-11-12 10:36:28 -08:00
Chris Craik
ae2e98310c Merge "Add shadow support to new reorderer/renderer" 2015-11-12 18:29:24 +00:00
Doris Liu
be2187a175 Merge "Add hooks in JNI to start using native path parsing" 2015-11-12 01:56:06 +00:00
Doris Liu
cdd23f9d45 Add hooks in JNI to start using native path parsing
Change-Id: Iaa0d3c2c1936c248146ed7f186a13e8e79be818e
2015-11-11 17:54:52 -08:00
Chris Craik
d3daa3198e Add shadow support to new reorderer/renderer
Doesn't yet use correct lighting info (esp. in layers), or
tessellate shadows asynchronously

Change-Id: I9ccec24b28869be42138a9bb234b1af874291a44
2015-11-11 13:32:37 -08:00
John Reck
7d9eb2aeb0 Merge "Fix memory corruption in SpotShadow" am: 8c85c00b5e am: 8c8353a8c3
am: 5bb2fdb425

* commit '5bb2fdb425dab346fb83c7f2bf9afa03bdf79fd6':
  Fix memory corruption in SpotShadow
2015-11-11 18:17:25 +00:00
John Reck
5bb2fdb425 Merge "Fix memory corruption in SpotShadow" am: 8c85c00b5e
am: 8c8353a8c3

* commit '8c8353a8c3152bc3ee4b74815d64c65c2c9d1991':
  Fix memory corruption in SpotShadow
2015-11-11 18:08:15 +00:00
Keith Mok
a1f5631340 Fix memory corruption in SpotShadow
The array list is too small and causing stack corruption

Change-Id: I0e34dad39357fb63977d2ce6f183ced7b6a632be
2015-11-11 08:49:20 -08:00
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