5154 Commits

Author SHA1 Message Date
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
Chris Craik
5e1814e2eb Merge "Remove logging of DisplayList staleness" 2014-01-28 23:18:05 +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
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
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
Chris Craik
3197cded4e Map shadow light position globally
Change-Id: Ic3201cecdf5d2a1dd628e7e40aee912ef516d3b2
2014-01-16 14:03:39 -08:00
Chris Craik
f533e94703 Support projection of DisplayLists onto ancestors.
For now, ancestor views signal the acceptance of projections with a
save(0x20)/restore pair.

During the order traversal, each view with the save(0x20) code will
collect descendent views with mProjectToContainedVolume (which still
needs to be renamed) so that they can be drawn out of order later.

- *Temporary* sample code added to HwAccelerationTest.

- Note that a projected displaylist must not be clipped.

Change-Id: I45c493e845961535b958d59c53e8aff3f8891d9f
2014-01-15 16:14:01 -08:00
John Reck
81155da284 Merge "Remove dead code" 2014-01-15 18:57:13 +00:00
John Reck
2114aef4ea Remove dead code
Change-Id: I9c96d3d21bd3faed91a5146f5a2b8916c634fdff
2014-01-15 09:37:38 -08:00
Leon Scroggins III
8790be6de3 Remove calls to deprecated SkBitmap::setIsOpaque()
setIsOpaque() has been removed from ToT Skia.

Update setters for mIsPremultiplied and hasAlpha to take the
other into consideration.

Change-Id: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a
2014-01-15 11:37:04 -05:00
Chris Craik
255fd80737 Merge "Simplify Z reordering logic" 2014-01-14 21:07:50 +00:00
Chris Craik
9f68c09626 Simplify Z reordering logic
Change-Id: I9e36f68d7be5cfd4d69a84a51824cb9a642fe18d
2014-01-14 12:52:41 -08:00
ztenghui
8a3452e7e1 Merge "Calculate and show the shadow from a spot light." 2014-01-13 18:28:42 +00:00
ztenghui
7b4516e7ea Calculate and show the shadow from a spot light.
Change-Id: Ia558852e8cde5d33866b22875eb501e4c6858819
2014-01-10 17:18:53 -08:00
Alan Viverette
58f09b3524 Add DisplayList bit for projecting onto a contained volume
Does not handle reordering/translating the projected DisplayList.

Change-Id: I6f1ebb2b20b7436c86fe849b35d582fd9c8a8967
2014-01-08 17:18:19 -08:00
RoboErik
2dfae9bea1 Merge "b/12068020 Make kb layouts only unique to vendor/product" 2014-01-08 22:07:14 +00:00
RoboErik
fb290df3c9 b/12068020 Make kb layouts only unique to vendor/product
Instead of storing a kb layout per device descriptor (which is expected
to be unique), store it for each vendor/product. This way we can keep
a consistent layout between identical but physically different keyboards.

There are some corner cases this is expected to fail on, namely devices
that incorrectly have the same vendor/product id. Devices that don't
define a vendor/product id will continue to use the descriptor to store
layout files.

Change-Id: Id0890d13e1c859eaf993d4831b7b1acbaf5df80f
2014-01-07 17:37:24 -08:00
John Reck
23b797ab51 EGL migration to native
Move EGL state management to native side for RemoteGLRenderer

Change-Id: I12b0fed70246564d4caebf87374e8bbca655c572
2014-01-07 14:53:55 -08:00
Chris Craik
d218a92c0a Use const where possible for drawing parameters
They should never be modified by a Renderer, only read and copied.

Change-Id: I9d8d55dca19115ee9dfeb2bb3f092ba2fb327cd4
2014-01-03 13:55:08 -08:00
Chris Craik
8523706236 Merge "Fix Clang warnings/errors" 2014-01-03 21:35:31 +00:00
Chris Craik
564acf7c9b Fix Clang warnings/errors
Fix several build warnings (struct != class, int != size_t) and errors
(variable leng non-POD arrays).

Change-Id: I70b4e784365514303d8954bfcb1f39d7c22c1321
2014-01-02 16:52:32 -08:00
Chris Craik
406af0293f Fix isRecording override
Change-Id: Ie73db838b749c29c6a8480ab67897492b83d337a
2014-01-02 14:56:40 -08:00
Chris Craik
d6b65f6771 Use const access to snapshot from OpenGLRenderer
Additionally, move clipping methods to StatefulBaseRenderer

Change-Id: Iff232bf16fc1ad3b7d89493da6d8915db7bc5e4f
2014-01-02 12:57:41 -08:00
Chris Craik
14e513058e Move Snapshot management to intermediate StatefulBaseRenderer class
The eventual goal is for the StatefulBaseRenderer to serve as the
common base class between the DisplayListRenderer and OpenGLRenderer.

This will separate DisplayList recording, Snapshot stack management,
and the GL in OpenGLRenderer.

Additionally, avoid sp<> parameters, and use const parameters in
several places, with the intent of greatly reducing the surface area
where renderer subclasses can modify snapshot stack.

Next steps:
-move bulk of clipping logic into StatefulBaseRenderer
-disable direct snapshot access

Change-Id: Ibc3c6747134ec7daf8ea535866239fa73b874390
2014-01-01 13:59:13 -08:00
Chris Craik
b458942bb6 Create abstract base class for OpenGLRenderer
This will eventually serve as a base class to allow
DisplayListRenderer to split off from OpenGLRenderer, and could
eventually support other rendering approaches, such as an
SkCanvas/SkPicture.

This will also be the main source of (implementation-independent)
documentation of the canvas/renderer methods.

Change-Id: I52047f338f5cf86a3b0b3002af7154bff5c3c227
2013-12-27 14:40:06 -08:00
Chris Craik
d863a10b28 Add initial APIs for 3d view manipulation.
Change-Id: I6de00bc577d5b3a1fbc9ca3a3b3668fcfa32b867
2013-12-20 15:15:01 -08:00
Amith Yamasani
49782e46c0 am 9158825f: Move some system services to separate directories
* commit '9158825f9c41869689d6b1786d7c7aa8bdd524ce':
  Move some system services to separate directories
2013-12-19 23:30:35 +00:00
Amith Yamasani
9158825f9c Move some system services to separate directories
Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
2013-12-19 15:25:37 -08:00
Brian Carlstrom
69d251383f Track Looper decoupling from ALooper
Change-Id: I83d1f5f6600019268c53706b7bf6d94b84931e18
2013-12-19 00:25:07 -08:00
Tim Murray
804ff38bff Handle user-defined cache path for RS.
Change-Id: I92e3346dca331ae6a9dfbe4f95292bc604dfd196
2013-12-18 17:04:04 -08:00
Victoria Lease
868399cdf4 Merge "pass SkGlyphCache into updateGlyphCache()" 2013-12-18 15:25:24 +00:00
Chris Craik
8b62cda493 Check mDisplayListData before deref
bug:12191897
Change-Id: I72ed3801e72c657b9d7736b0efb33c5e7cfd5b57
2013-12-17 15:07:47 -08:00