5181 Commits

Author SHA1 Message Date
Derek Sollenberger
76d3a1b8d0 Removing SkiaColorFilter and inspecting the native object directly.
bug: 10650594
Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
2014-02-07 17:06:14 -05:00
Derek Sollenberger
8852ab4357 Merge "Keep the SkPaint used when creating a layer." 2014-02-07 20:52:22 +00:00
Chris Craik
27bfb24518 Merge "Rework and clean up DisplayList projection" 2014-02-07 18:47:57 +00:00
Derek Sollenberger
d44fbe55a9 Keep the SkPaint used when creating a layer.
This will allow us to inspect the paint for thing other than
color and xfermode, such as SkColorFilters and SkShaders.

bug: 10650594
Change-Id: I2c3ddd07a3966e1e77af34136307e2b59b2898c1
2014-02-07 13:33:29 -05:00
Chris Craik
1df26446b7 Rework and clean up DisplayList projection
Move the projection surface to be a property of a DisplayList,
set to true for every background drawable.

Additionally, handle a projecting view background such that it doesn't
try to project onto itself (which is undesirable).

Change-Id: Ic70b17474bd87340e80767f8518f73b233419c7a
2014-02-06 16:07:37 -08:00
Chris Craik
fdace4e238 Merge "Simplify DisplayList matrices" 2014-02-06 23:22:28 +00:00
Chris Craik
ba9a21561e am 2c764b20: am 0ec3ca6e: am 449273e2: Merge "Fix for positioning of glyphs within a bitmap"
* commit '2c764b20e4a35c509f49e3d9430e135b4f3a0984':
  Fix for positioning of glyphs within a bitmap
2014-02-05 21:52:23 +00:00
Chris Craik
2c764b20e4 am 0ec3ca6e: am 449273e2: Merge "Fix for positioning of glyphs within a bitmap"
* commit '0ec3ca6e08e5933016beda147ca9a82e96434b15':
  Fix for positioning of glyphs within a bitmap
2014-02-05 21:43:48 +00:00
Chris Craik
449273e2d5 Merge "Fix for positioning of glyphs within a bitmap" 2014-02-05 21:36:42 +00:00
Chris Craik
629f67709b Simplify DisplayList matrices
Somewhat unifies the ortho/perspecive paths - the property matrix
(translate/scale/rotate) is now always a Matrix4.

Change-Id: I36e4fe83d1150ee6e4be5f64f34d0fc8d6525cc6
2014-02-05 13:12:04 -08:00
ztenghui
a989cb29c3 Merge "Fixing a bad bug when there is no real umbra" 2014-02-03 22:18:54 +00:00
ztenghui
5176c974f1 Fixing a bad bug when there is no real umbra
This fixed most of the issues when the light's Z postion is low.

Change-Id: If49afbf8aa90b1ce32fd628a62ed982a1a473da2
2014-01-31 17:44:07 -08:00
Chris Craik
494db9e4bb Merge "Simplify umbra calculation" 2014-01-31 18:57:25 +00:00
Chris Craik
1d89563ff8 Merge "Add initial hidden outline APIs" 2014-01-31 18:56:41 +00:00
Chris Craik
12d9526dd2 Simplify umbra calculation
Reuse pre-computed values

Change-Id: Ia7725be0ec3ac58af477fcb8de375f5faa05abf4
2014-01-31 10:43:42 -08:00
Narayan Kamath
d49babe50d am 9af95574: am 1cadc07d: Merge "Change ResourceType cookies to int32_t."
* commit '9af955744d4e0d82b61fc99a932b9a5cf28b5df7':
  Change ResourceType cookies to int32_t.
2014-01-31 16:29:19 +00:00
Narayan Kamath
7c4887f66b Change ResourceType cookies to int32_t.
Also change the order of parameters in ResTable constructors
to avoid ambiguity.

(cherry picked from commit 00b314436f4fdfada4bbf1e79ec12e9fa38aeaf1)

Change-Id: I874c5d03c134dc3c331fba423b5280366296287c
2014-01-31 13:47:27 +00:00
Narayan Kamath
acda961446 Merge "Change ResourceType cookies to int32_t." 2014-01-31 13:46:08 +00:00
Chris Craik
a2fe7affd3 Add initial hidden outline APIs
Background drawable outline usage and drawable outline calculation
still to come.

Change-Id: I8c7539f1638f86e1f8eb11f4fe49f705f61d58ba
2014-01-30 16:04:16 -08:00
John Reck
3040f73541 Merge "Fix nano vs. millis" 2014-01-30 23:16:10 +00:00
John Reck
a6260b83da Fix nano vs. millis
Change-Id: I54f752bb7faab5fa66c36252c9f7cf8f5c9939c9
2014-01-29 19:59:16 -08:00
ztenghui
f3560a133e Merge "Merge close vertices in a better way." 2014-01-29 23:45:12 +00:00
Chris Craik
6657a6c539 Update reordering method names, and make 3d reordering API public
IsContainedVolume -> hasIsolatedZVolume conveys that this affects Z
ordering of views

ProjectToContainedBackground -> ProjectBackwards, since it ended up
using its own projection target, separate from the 3d volume bit

Change-Id: Ia2cde838cc4da134366fe6ff623290fbd65e50c3
2014-01-29 13:55:39 -08:00
Chris Craik
967c7fb2af Merge "Fix projection offset caching" 2014-01-29 21:20:36 +00:00
Chris Craik
d04a6b15f7 Fix projection offset caching
Because the caching of projection matrix didn't account for changes in
the offset flag, the flag could be ignored. Now we use both to verify
that the cached matrix can be used.

Change-Id: I193b94eaf0b98f046a6484f0866c3d25048653fd
2014-01-29 13:04:33 -08:00
ztenghui
f5ca8b4cb1 Merge close vertices in a better way.
And add more verification code for testing purpose.

Change-Id: I5bc4f69e6582c02fd03106af9a98abd05a6755b7
2014-01-29 09:04:04 -08:00
Chris Craik
5e1814e2eb Merge "Remove logging of DisplayList staleness" 2014-01-28 23:18:05 +00:00
Narayan Kamath
00b314436f Change ResourceType cookies to int32_t.
Also change the order of parameters in ResTable constructors
to avoid ambiguity.

Change-Id: If7bfa1f640dddca39b9f26a3ce84081fa7b6e6e3
2014-01-28 16:27:52 +00:00
John Reck
e742799cae Merge "Native-side proxy" 2014-01-28 00:45:44 +00:00
John Reck
4f02bf4eef Native-side proxy
Remove RemoteGLRenderer
 Remove reflection-based control

Change-Id: If17c2bbb61c7141986d88c4763def77ed1074985
2014-01-27 16:40:39 -08:00
Chris Craik
db7516e3bd Merge "Use path outlines to define shadow shapes" 2014-01-27 22:30:52 +00:00
Chris Craik
3783e70b55 Remove logging of DisplayList staleness
Change-Id: Ie6b3af3065d4d10ec0bc9b419223d3458d297ea8
2014-01-27 14:29:37 -08:00
Narayan Kamath
a0c6260705 AssetManager cookies should be int32_t and not void*.
Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.

Change-Id: I319f271bd4f102dee7cb9f00df4c75ea697456f5
2014-01-27 10:31:11 -08:00
Narayan Kamath
90f58dbf79 Add libutils dependency for libandroidfw host build.
(cherry picked from commit 070274ec0ccb8643c52e41e4119f356f0f51bc36)

Change-Id: I25acff1d36b3adce14b2576485bda93c914d7f5d
2014-01-27 10:31:11 -08:00
Narayan Kamath
560566d291 Reimplement ZipFileRO in terms of libziparchive.
This lets us share zip archive processing code with both
the runtime (Art, dalvik) and critical java code
(StrictJarFile).

This change also moves several utility methods to ZipUtils
and dedups code across several zip inflation methods.

One of the side effects of this change is that several
processing loops are now O(n) instead of O(n^2).

bug: 10193060

(cherry picked from commit afd31e08299008fdc5c2813f21b2573f29dc53df)

Change-Id: Iae67e62f1dc6dfc3f43e29bc38e3ffd1cb14d191
2014-01-27 10:31:11 -08:00
Elliott Hughes
e1aa223657 Re-apply androidfw fixes lost by the directory rearrangement.
Assignment to wrong variable in libs/androidfw/AssetManager.cpp.
https://code.google.com/p/android/issues/detail?id=61560

Missing delete[]s in libs/androidfw/ObbFile.cpp.
https://code.google.com/p/android/issues/detail?id=61549

Change-Id: I24e6867284d70a7793d78e62d1a836cbee310fb0
2014-01-27 10:31:10 -08:00
Adam Lesinski
16c4d154dc Revert "move libandroidfw to frameworks/native"
This reverts commit 84b6292c33d71b5739828d08aa8101d1954577f2.
2014-01-27 10:31:10 -08:00
Narayan Kamath
1cd2834fde am 30e20ac5: am ebd43d46: am dff83e2b: am d5970e9c: Merge "AssetManager cookies should be int32_t and not void*."
* commit '30e20ac528731a778eec45506d1e57c8839b318a':
  AssetManager cookies should be int32_t and not void*.
2014-01-27 12:07:15 +00:00
Narayan Kamath
745d4efc83 AssetManager cookies should be int32_t and not void*.
Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.

(cherry picked from commit ebfdd0f467e39c3af8d92cade78263935340acb7)
(cherry picked from commit a7fa2e592e2e579e5acdb903dba83fc074ebc215)
(cherry picked from commit a9d5701b034ed2d9771b3f0943e1add00741d7cd)

Change-Id: I2aed3db568b6fdc487bf99e2c5dd123206736fda
2014-01-27 11:20:24 +00:00
Chris Craik
15a07a21eb Use path outlines to define shadow shapes
Fixes the simplifying assumption that shadow casters were always
rectangular.

Java side APIs + plumbing to pass down correct shapes still need to be added.

Change-Id: Ic4fee90af15679951a44bb5cc6ae454b98c4c194
2014-01-26 13:43:53 -08:00
Chris Craik
bb615a6ffb Clear root level reorder lists to prevent accessing stale DisplayLists
bug:12581401

Adds temporary logging which should log/crash earlier on incorrectly
reordering hierarchies.

Change-Id: Iee00940718c3cc868161e754aff93cd3b2747094
2014-01-24 15:01:40 -08:00
Alexander Toresson
3ed1927603 Fix for positioning of glyphs within a bitmap
For positioning of glyphs within a bitmap, roundf(int + float) is used,
where the float is the glyph position and the int is the text position.
When the text position is varied, this may lead to the sum being rounded
in different directions, due to floating point rounding, caused by that
floating point numbers have different precision in different ranges.

This may therefore lead to slightly different positioning for glyphs and
therefore slightly different widths and heights for text strings,
depending on the position they are rendered at.

The solution in this patch is to use int + (int) roundf(float), which
has consistent rounding, and also enables us to use the full range of
ints.

Change-Id: Id1143cdfcbdfa9915ced878ae04df589a3e03cee
2014-01-23 13:31:15 +01:00
ztenghui
cc3c25622c Property support for light positioning.
Tune up the light size to make it look better.

Change-Id: I139a05f3dd53dacbe55759b91188f0e1cc2c7f80
2014-01-17 13:42:09 -08:00
Chris Craik
3a3bdd042d am ee846d3e: am 38cf0704: am e9a7d229: am 66b5a2b2: am 5150eb8f: Merge "Initialize pointer members to NULL to avoid illegal reference"
* commit 'ee846d3e74eda006f4bbf17cb4844b4d8f9c5cb0':
  Initialize pointer members to NULL to avoid illegal reference
2014-01-17 20:11:38 +00:00
Chris Craik
ee846d3e74 am 38cf0704: am e9a7d229: am 66b5a2b2: am 5150eb8f: Merge "Initialize pointer members to NULL to avoid illegal reference"
* commit '38cf0704f6fbfa6d41d5d10488ce25e645adb835':
  Initialize pointer members to NULL to avoid illegal reference
2014-01-17 19:30:31 +00:00
lina.x.pi
920287399a Initialize pointer members to NULL to avoid illegal reference
mBitmap and mTexture is not initialized to NULL which causes
illegal address access when it fails to be created from
oversized bitmap.

Change-Id: Iea54bec8788bc5f3a10040fdb43f416c0d41a14c
2014-01-17 13:49:26 +09:00
Chris Craik
8191effc83 Merge "Map shadow light position globally" 2014-01-17 02:09:19 +00:00
Chris Craik
ed0f7cba53 Merge "Fix view z translation with 3d projection disabled" 2014-01-17 02:07:46 +00:00
Chris Craik
7b3dfa4d13 Transform shadow casters correctly in 3d
Change-Id: I11067c5aa8c749089b6ee163ddafa91865cc0d9f
2014-01-16 16:21:10 -08:00
Chris Craik
cf8d9d4af3 Fix view z translation with 3d projection disabled
The ortho projection can't handle 3d translation, so skip that step if
perspective projection isn't enabled.

Change-Id: I231e6bcecc82e876b697e098e034f0fd3b06efde
2014-01-16 14:48:54 -08:00