8175 Commits

Author SHA1 Message Date
Seigo Nonaka
6af8c0968e Merge "Revert "Remove obsolete interface GetTable."" 2016-10-25 03:58:02 +00:00
Seigo Nonaka
436f8ac786 Revert "Remove obsolete interface GetTable."
This reverts commit 9cd73b6828e4e7475ab430c373efa2cd6dc69cea.

This causes a crash on Android Auto.
Bug: 32374752

Change-Id: I7fd0a52eb2458772ff50f246ca1c7d3397554133
2016-10-25 00:49:14 +00:00
Stan Iliev
f50806afb8 Merge SkiaCanvas changes from master-skia to master branch.
Most changes are taken from ag/1407698, ag/1336660, ag/1488900.

Test: Built and run manually on angler-eng.
Change-Id: Id4e464b9a83c62b6bc7ea31a30e5ca6cd53b659d
2016-10-24 12:16:13 -04:00
Sergei Vasilinetc
0dd9902595 Merge changes I1d8a9a6e,I5adcd59d
* changes:
  Use Bitmap in DisplayList & RecordedOps instead of SkBitmap Test: refactoring cl. bug:32216791
  Pass Bitmap instead of SkBitmap in drawNinePatch & drawBitmapMesh Test: refactoring cl. bug:32216791
2016-10-21 21:11:49 +00: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
Jakub Adamek
93bbe47d65 Change name of overlay subdir 'sku'->'theme' am: 54dcaaba4f
am: 6bbb63ad91

Change-Id: I71dfaafbebaa7bd61d182405c734eef1ea7ff1eb
2016-10-21 07:16:07 +00:00
Jakub Adamek
6bbb63ad91 Change name of overlay subdir 'sku'->'theme'
am: 54dcaaba4f

Change-Id: I4536de644c20171e175cddaff0cd041fb05b3038
2016-10-21 07:05:17 +00:00
Sergei Vasilinetc
cc97d86da8 Merge "Pass Bitmap instead of SkBitmap for bitmap rect operation Test: refactoring cl. bug:32216791" 2016-10-20 23:05:05 +00: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
Sergei Vasilinetc
4d2a1dc01f Merge "Pass Bitmap instead of SkBitmap in canvas.drawBitmap(Bitmap, float,float,Paint) Test: refactoring cl. bug:32216791" 2016-10-20 19:35:59 +00:00
Sergei Vasilinetc
638afc8b0f Merge "Rename hwui/PixelRef to hwui/Bitmap Test: refactoring cl. bug:32216791" 2016-10-20 19:35:31 +00: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
sergeyv
c1c54062f8 Rename hwui/PixelRef to hwui/Bitmap
Test: refactoring cl.
bug:32216791

Change-Id: I26de43f71027bccb43a5011f84080ab4631b2883
2016-10-20 09:48:02 -07:00
Seigo Nonaka
ebeb817966 Merge "Remove obsolete interface GetTable." 2016-10-20 08:05:35 +00:00
TreeHugger Robot
ac625e5e2e Merge "Add tests for attribute resolution" 2016-10-20 01:42:24 +00: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
Sergei Vasilinetc
7ca5ad1d06 Merge "Move allocatePixelRef methods to hwui. This patch also makes tests to use SkBitmap backed by hwui/PixelRef, Test: refactoring cl. bug:27762775" 2016-10-19 20:30:24 +00:00
Jakub Adamek
54dcaaba4f Change name of overlay subdir 'sku'->'theme'
The name 'sku' does not fit well as we recommend to use the same
value for different SKUs if vendors wish to have the same colors
on those SKUs.

Bug: 32268656
Change-Id: Ib5e5a3386676453dafeb13a6a6bf91f81bb48a11
2016-10-19 14:06:32 +01:00
Adam Lesinski
08a870cd6d Fix race with Asset destruction and printing allocation stats am: 2582465bb4
am: 882f8168b0

Change-Id: I613fabdaad38be88ff9c4527e100e33a87f9d601
2016-10-18 20:53:59 +00:00
Adam Lesinski
882f8168b0 Fix race with Asset destruction and printing allocation stats
am: 2582465bb4

Change-Id: I1dbb7609fa4d770e513e6f628e4c598600607383
2016-10-18 20:40:50 +00:00
Mike Reed
ca9b1ed9f0 Merge "use SkBlendMode instead of SkXfermode use sk_sp versions of paint setters/getters" 2016-10-18 13:57:13 +00:00
Seigo Nonaka
9cd73b6828 Remove obsolete interface GetTable.
Test: Manually done.

Change-Id: Ib9f50610454a6ddd7179c40d5f31c74916bcff84
2016-10-18 15:10:21 +09:00
George Burgess IV
11ca129c2b Merge "Fix static analyzer warnings." am: ff5c3ad08b am: 1db1a86bba
am: e76253055c

Change-Id: I37be36a86dbab762c64696843916e88f17908251
2016-10-18 01:56:57 +00:00
George Burgess IV
e76253055c Merge "Fix static analyzer warnings." am: ff5c3ad08b
am: 1db1a86bba

Change-Id: Iafed2ab4df7297ed8e3b0b86cafe15af3e1c8823
2016-10-18 01:49:53 +00:00
George Burgess IV
1db1a86bba Merge "Fix static analyzer warnings."
am: ff5c3ad08b

Change-Id: I655fd765cfeae407c070261cfe07ce8b739b06fa
2016-10-18 01:43:24 +00:00
Adam Lesinski
7a37b74d37 Add tests for attribute resolution
- Adds unit tests for attribute resolution. These include
  some test data resource tables and compiled XML files.
- Convert touched files to Google style guide.

Test: make libandroidfw_tests
Change-Id: Ib3a36061dc874de5f6a266b4e82c0a12ef435f23
2016-10-17 18:33:42 -07:00
Treehugger Robot
ff5c3ad08b Merge "Fix static analyzer warnings." 2016-10-18 01:30:55 +00:00
Adam Lesinski
2582465bb4 Fix race with Asset destruction and printing allocation stats
A race could occur when printing the list of Asset allocations for
debugging purposes.

Each Asset object would insert themselves into a global linked list
on construction and remove themselves on destruction. Iterating the list
and the insertion/remove operations all acquire a global lock.

The race occurs after the Asset subclass destructor runs but before the Asset
base class destructor runs, which performs the actual removal from the list.

The vtable of the object being destroyed ends up pointing at the base Asset class'
vtable, and during the iteration of the global list, a pure virtual method is called
leading to an abort, since the wrong vtable is dereferenced.

This change moves the insertion/removal of the Asset object into the global list
to the concrete class, which adds some maintenance overhead but solves the problem.

Bug:31113965
Test: make libandroidfw_tests
Change-Id: I1a620897e5e04a8519ee247883bba0719b1fa6f3
(cherry picked from commit 0358efe4f76f42d9eea91600202a5ab0831d9cef)
2016-10-18 01:27:39 +00:00
TreeHugger Robot
047f5a7b4f Merge "Fix race with Asset destruction and printing allocation stats" 2016-10-18 00:25:00 +00:00
TreeHugger Robot
52528d7629 Merge "Fix complex clipping on mergeable ops" 2016-10-17 22:11:46 +00:00
Mark Salyzyn
21c2e9e60c Merge "missing includes" am: 78929f3ee0 am: 6a8f0d70b0
am: 6e60ab12e7

Change-Id: I1b5c6f49d2ae565ebd59c6ce8d590512ab306487
2016-10-17 21:38:33 +00:00
Mark Salyzyn
6e60ab12e7 Merge "missing includes" am: 78929f3ee0
am: 6a8f0d70b0

Change-Id: I40ff974f4333aaa714a63d5436b822491b9d78d6
2016-10-17 21:31:35 +00:00
Mark Salyzyn
6a8f0d70b0 Merge "missing includes"
am: 78929f3ee0

Change-Id: I3e7a25ded484d516fab453abe434c2e53cf0f27e
2016-10-17 21:25:59 +00:00
Adam Lesinski
0358efe4f7 Fix race with Asset destruction and printing allocation stats
A race could occur when printing the list of Asset allocations for
debugging purposes.

Each Asset object would insert themselves into a global linked list
on construction and remove themselves on destruction. Iterating the list
and the insertion/remove operations all acquire a global lock.

The race occurs after the Asset subclass destructor runs but before the Asset
base class destructor runs, which performs the actual removal from the list.

The vtable of the object being destroyed ends up pointing at the base Asset class'
vtable, and during the iteration of the global list, a pure virtual method is called
leading to an abort, since the wrong vtable is dereferenced.

This change moves the insertion/removal of the Asset object into the global list
to the concrete class, which adds some maintenance overhead but solves the problem.

Bug:31113965
Test: make libandroidfw_tests
Change-Id: I1a620897e5e04a8519ee247883bba0719b1fa6f3
2016-10-17 14:04:09 -07:00
Chris Craik
f8f56cbb20 Fix complex clipping on mergeable ops
Fixes: 32106003
Test: unit tests passing (and one added)

Change-Id: I519bc38a1fa8c25c9ae317ffdb7e59e5a0824f59
2016-10-17 13:40:32 -07: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
Chris Craik
dfe4a1b6ee Fix complex clipping on mergeable ops DO NOT MERGE am: d183e0b988
am: a6bfd8d12c

Change-Id: I5af8d0fac1e47e7bf831ca2f387fe550acf4165c
2016-10-17 19:59:32 +00:00
Chris Craik
a6bfd8d12c Fix complex clipping on mergeable ops DO NOT MERGE
am: d183e0b988

Change-Id: Icb357a11cb8a4be473aa8b0acdb4d799973ff54a
2016-10-17 19:52:53 +00:00
Mark Salyzyn
4d6c372eae missing includes
Assumptions are made about header side effects

Test: compile
Bug: 30465923
Change-Id: Icc9415aed5e54b2bc00b70aa0da6df4148f30654
2016-10-17 12:32:54 -07:00
Chris Craik
d183e0b988 Fix complex clipping on mergeable ops DO NOT MERGE
Fixes: 32106003

Change-Id: I519bc38a1fa8c25c9ae317ffdb7e59e5a0824f59
2016-10-17 10:51:11 -07:00
sergeyv
c36bd6c16d Move allocatePixelRef methods to hwui.
This patch also makes tests to use SkBitmap backed by hwui/PixelRef,
Test: refactoring cl.
bug:27762775

Change-Id: Ib936e81877790849118420f5e565fc8f4466c1be
2016-10-13 18:22:04 -07:00
George Burgess IV
e8efec56f0 Fix static analyzer warnings.
frameworks/base/libs/androidfw/ResourceTypes.cpp:742:46: warning: Result
of 'calloc' is converted to a pointer of type 'char16_t *', which is
incompatible with sizeof operand type 'char16_t **'
    mCache = (char16_t**)calloc(mHeader->stringCount,
        sizeof(char16_t**));

frameworks/base/libs/androidfw/ResourceTypes.cpp:4359:28: warning:
Potential leak of memory pointed to by 'set'
     return NO_MEMORY;

Bug: None
Test: Builds without the aforementioned warnings.
Change-Id: I1f84c1b9f4cba05f5cc7c3ae9fec1a07bc9cd8fe
2016-10-13 15:32:33 -07:00
Adam Lesinski
57e1950542 Merge "Move attribute resolution from core/jni to libandroidfw" 2016-10-13 21:22:26 +00: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
Derek Sollenberger
6e68bedacc Merge "Initial refactoring to enable the addition of the SkiaOpenGLPipeline." 2016-10-13 16:53:14 +00:00
TreeHugger Robot
8e56eea48c Merge changes Icd65d906,I109cb9db
* changes:
  Don't apply the OECF twice to multi-stop gradients
  JNI does not use hwui_flags but LOCAL_CFLAGS
2016-10-13 03:27:21 +00:00
Romain Guy
f9037dabea Don't apply the OECF twice to multi-stop gradients
Test: Manual

Change-Id: Icd65d906df2f0a059373edb8c6d55fe378c92f92
2016-10-12 18:31:31 -07:00
TreeHugger Robot
a6abb1031f Merge "Fatal abort on invalid state" 2016-10-12 23:12:18 +00:00
Romain Guy
3b26c211e3 Merge "Various fixes for linear blending and gradients" 2016-10-12 22:17:10 +00:00