summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* LayoutLib: Update layoutlib with revised API.Xavier Ducrohet2010-12-2115-194/+204
| | | | Change-Id: I78929df621f48e85d9cbefe1f5590f9ce99bbaff
* Ensure bitmaps aren't freed while referenced from a display listPatrick Dubroy2010-12-201-3/+0
| | | | | Also removes the reference queue finalizers. They aren't necessary anymore now that Bitmaps are allocated in the heap.
* LayoutLib: replace the stack of Graphics2D with custom snapshots.Xavier Ducrohet2010-12-154-114/+404
| | | | | | | | | | | | | The first step is to allow the canvas to save only the matrix or the clip. Previously, since the graphics2D were created completely new on each save, everything was saved. Also allows to set transform/clip on the Canvas when no bitmap has been set (and therefore no Graphics2D exists). This is required by BitmapFactory. Change-Id: I37eff6dde1ca708d58ba317b40e9b3236f3ef3d0
* Fix build break due to additional arg in Bitmap ctorPatrick Dubroy2010-12-141-1/+1
|
* Merge "LayoutLib: Fix gradient rendering."Xavier Ducrohet2010-12-146-64/+166
|\
| * LayoutLib: Fix gradient rendering.Xavier Ducrohet2010-12-146-64/+166
| | | | | | | | | | | | | | | | - fully support canvas transform - fully support shader local transform - fix repeat/mirror issue in the negative values. Change-Id: Ib2aa7ade1c2702da4364cbda9a5a3ae72c1d3174
* | Merge "LayoutLib: Misc fix to rendering."Xavier Ducrohet2010-12-143-1/+4
|\ \ | |/
| * LayoutLib: Misc fix to rendering.Xavier Ducrohet2010-12-143-1/+4
| | | | | | | | Change-Id: Ia73fab1be3c01e6ce5791973e636e45a0f75ceb6
* | Merge "LayoutLib: Use the new ninepatch API to suppor density."Xavier Ducrohet2010-12-144-8/+11
|\ \ | |/
| * LayoutLib: Use the new ninepatch API to suppor density.Xavier Ducrohet2010-12-134-8/+11
| | | | | | | | | | | | LayoutLib now compiles against a prebuilt of ninepatch. Change-Id: I0a1ca60af90933c171ab3aa456b47f0329df2f55
* | am 0ccc8b73: am 5441a9ff: Merge "GL texture filtering changed from AND to ↵Dan Morrill2010-12-141-2/+2
|\ \ | |/ |/| | | | | | | | | OR, so rename tag name to match. (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen)." into gingerbread * commit '0ccc8b7345eac0b507c221be47e55926cbda8957': GL texture filtering changed from AND to OR, so rename tag name to match. (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen).
| * am 5441a9ff: Merge "GL texture filtering changed from AND to OR, so rename ↵Dan Morrill2010-12-141-2/+2
| |\ | | | | | | | | | | | | | | | | | | tag name to match. (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen)." into gingerbread * commit '5441a9ff2128cf2c5088974c74b79d2d1734f755': GL texture filtering changed from AND to OR, so rename tag name to match. (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen).
| | * GL texture filtering changed from AND to OR, so rename tag name to match.Dan Morrill2010-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen). Change-Id: I0f20aed7f95169d9adfc7fe128191eb6e49d116f
* | | LayoutLib: implement more of Canvas/Paint.Xavier Ducrohet2010-12-132-36/+103
| | | | | | | | | | | | Change-Id: I8e2a7a3bddbce08db5eb641b5075bedd75f7be27
* | | LayoutLib: parsed resources were always set as platform res.Xavier Ducrohet2010-12-103-1/+11
| | | | | | | | | | | | | | | | | | | | | I broke this last week when adding the support for layout params in moveChild. Change-Id: Iaaf9b9f685ca301638d4037e98428ea0a00279c9
* | | LayoutLib: Adapt to new LayoutLibXavier Ducrohet2010-12-1011-234/+147
| | | | | | | | | | | | | | | | | | | | | API now uses ResourceValue instead of IResourceValue Capabilities renamed Capability Change-Id: Ia5d2b6c8d536e020a1f5496fb2285f67fc4346c4
* | | Change assets to use 64-bit APIKenny Root2010-12-083-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The asset system and supporting libraries were using off_t instead of off64_t to access files larger than 2GB (32-bit signed). This change replaces all off_t with off64_t and lseek64. There is a new utils/Compat.h added for Mac OS compatibility. Also fixed some size-related compiler warnings. Bug: 3205336 Change-Id: I9097b3cb7a602e811fe52f245939d8975da55e9e
* | | LayoutLib: explicitely override PropertyValuesHolder native code.Xavier Ducrohet2010-12-073-6/+55
| | | | | | | | | | | | Change-Id: Ic7dd9efc990d01b20db144117cb11eb130349048
* | | Merge "LayoutLib: Update font object when text info changes in paint delegate"Xavier Ducrohet2010-12-061-7/+9
|\ \ \
| * | | LayoutLib: Update font object when text info changes in paint delegateXavier Ducrohet2010-12-061-7/+9
| | | | | | | | | | | | | | | | Change-Id: I6ff7e1ec4513918256aee99acc5ea298a5fdb8a8
* | | | LayoutLib: Fix logging.Xavier Ducrohet2010-12-0612-98/+114
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | - Use the new logging API - remove log object reference everywhere but in Bridge - all logging code accesses Bridge.getLog() - prepareScene sets the current scene log object in Bridge. Change-Id: Ib0517ccd6454c4baf218b6baa978a126f91671e7
* | | LayoutLib: Animation support in insert/move/removeChild actions.Xavier Ducrohet2010-12-034-64/+288
| | | | | | | | | | | | | | | | | | Also update to use the new SceneResult API. Change-Id: Iaac6df0c250fbefc8758310c37e0cf47cae6875d
* | | LayoutLib: Create new layoutparams when moving a childXavier Ducrohet2010-12-026-22/+184
| | | | | | | | | | | | Change-Id: Ie2183490e8d26ef194030a9d87fe7745f24f1d83
* | | LayoutLib: Update to use the new moveChild API.Xavier Ducrohet2010-12-022-1/+20
| | | | | | | | | | | | | | | | | | Also, return supported capabilities. Change-Id: I824120d50f2865a667dc6c81d455ae19321966b6
* | | Improve support for external keyboards.Jeff Brown2010-12-021-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Vendor ID, Product ID and optionally the Version to locate keymaps and configuration files for external devices. Moved virtual key definition parsing to native code so that EventHub can identify touch screens with virtual keys and load the appropriate key layout file. Cleaned up a lot of old code in EventHub. Fixed a regression in ViewRoot's fallback event handling. Fixed a minor bug in FileMap that caused it to try to munmap or close invalid handled when released if the attempt to map the file failed. Added a couple of new String8 conveniences for formatting strings. Modified Tokenizer to fall back to open+read when mmap fails since we can't mmap sysfs files as needed to open the virtual key definition files in /sys/board_properties/. Change-Id: I6ca5e5f9547619fd082ddac47e87ce185da69ee6
* | | Layoutlib: update with new add/movechild API.Xavier Ducrohet2010-12-024-42/+33
| | | | | | | | | | | | Change-Id: I33e3a07cd7db7fe996d1f52b84b4b3bf21065a51
* | | LayoutLib: Reuse canvas when possible.Xavier Ducrohet2010-12-025-110/+162
| | | | | | | | | | | | | | | | | | | | | Also moved the prepare/cleanupThread methods to Bridge as they are not really specific to the scene anymore. Change-Id: I7b93821913ce4d2fcbe3d8be489be6533ff87e57
* | | LayoutLib: implement insert/move/removeChild.Xavier Ducrohet2010-12-014-12/+170
| | | | | | | | | | | | Change-Id: I1c05ff4dc80e5ee4ea67d322acaf9c94276f84e1
* | | LayoutLib: get AWT image from new image factory.Xavier Ducrohet2010-11-291-3/+8
| | | | | | | | | | | | Change-Id: Ib760af8a77fefac2571b8b4e48b4728e158aab2f
* | | Layoutlib: Animation support.Xavier Ducrohet2010-11-2910-78/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New locking mechanims to prevent concurrent renderings. There's now a thread specific prepareThread() method (only prepares the looper) and its associated cleanupThread(). For the rendering itself, acquire must be called before doing any type of Android specific work on the scene (inflate or rendering) After instantiation, init() must be called, which also acts as acquire. Added a lot of checks to make sure method aren't called without acquire or if scenes try to be rendered while acquire was called from the same thread but on another scene. Animation implementation: - Handler delegate to use our own queue (since the animation runs through handler messages). This uses a callback to process the message. This callback is per-thread and only used in animation threads. - SystemClock delegate to provide clock implementation. - AnimationThread to handle playing the animation and calling back to the animation listener. Change-Id: Ia39aba7ed476759df1da3200e413fe3e92590d15
* | | Merge "Fix build on Linux due to different strrchr prototype."Jeff Brown2010-11-231-1/+1
|\ \ \
| * | | Fix build on Linux due to different strrchr prototype.Jeff Brown2010-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems Linux host build has a fancy strrchr overload that preserves constness. That's nice but it broke this. Change-Id: I3c9b57b9ce9abc5d334d1e7b2498a3248bd20a6a
* | | | Merge "Port Emulator keymaps."Jeff Brown2010-11-232-0/+144
|\ \ \ \ | |/ / /
| * | | Port Emulator keymaps.Jeff Brown2010-11-232-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also added a validation tool for keymaps (not currently integrated into the build system but getting there). This change brings back Android.mk with the intent that it will be used to validate keymaps in a later change. Added some missing keys that are present on phones. Bug: 3215210 Bug: 3225421 Change-Id: Id817c6e2215164616942c51a42752915d9ceacd3
* | | | Layoutlib: use default nine patch classes.Xavier Ducrohet2010-11-2310-166/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from using our own implementation of NinePatchDrawable. Now use native delegate for a few methods of NinePatch. The byte[] used to describe the 9-patch chunk is entirely controlled by the delegate. Therefore, while the default version (JNI) use the array as a representation of a C struct, this version uses the array as a serialized version of NinePatchChunk. A cache mechanism using SoftReferences allows us to not deserialize the array every time rendering needs to access the chunk itself. The Bridge-level cache mechanism for bitmaps and nine-patches as changed. Since the new nine-patches doesn't hold the bitmap data anymore (it's stored in a normal Android bitmap which is cached itself through the cache), then the nine-patch cache has been changed to only contain the nine patch chunk. Also initialize the canvas with the display metrics to prepare for correct scaling when density of the assets don't match the target density. Still to come: actual density support in the 9-patch drawing code. Change-Id: Ibefcccf4432e1986e8436e0c41a0107741593536
* | | | Add knowledge of mipmap to aaptKenny Root2010-11-224-25/+60
|/ / / | | | | | | | | | | | | | | | | | | New mipmap drawable type that does not get filtered according to configuration. Useful for things that get built as part of the system. Change-Id: I556033d065e504079271dce79c23c90d3c387ce4
* | | Layoutlib: support for editing embedded layouts.Xavier Ducrohet2010-11-195-18/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | When Resources.getLayout(int) is called to return a parser for an embedded layout, this queries the current parser for a custom parser (Eclipse will provide one on top of the current XML model being edited) Change-Id: Ia9e837358f67daed0a835e1b3f4f50c0516ceee9
* | | LayoutLib: use the new expand API.Xavier Ducrohet2010-11-191-9/+20
| | | | | | | | | | | | Change-Id: I248de70ebe97aa6fb1cbcb5b6572a4a46c5ca1ba
* | | LayoutLib: fix some testsXavier Ducrohet2010-11-192-3/+7
| | | | | | | | | | | | Change-Id: Iacd641e2fac663ff12fe2a08ba093c4eaa2e8862
* | | Layoutlib: support viewkey in include nodes.Xavier Ducrohet2010-11-183-44/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an include tag is parsed, the custom bridge code never has access to both parsers at the same time. The child parser is created out of an in (representing the layout id), and the code inflating the content of the include layout doesn't see the parent parser either. This changeset adds a parser stack in the BridgeContext in order to allow access to the parent parser when setting the viewkey. This is only used if the current parser depth is 1 (top node), as we only want to set the include node to the top node of the included layout. Change-Id: I2ac3b72a0c84a269d9019f44f98cbc0b615ab959
* | | Layoutlib: use int[] wrapper to use as map keys.Xavier Ducrohet2010-11-181-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the SlidingDrawer that failed to load. For some reason, in case of the SlidingDrawer, when the constructor uses android.R.styleable.SlidingDrawer it's the same values but not the same instance as the array read from android.R through reflection. So what works for all other widgets, and has worked since the very first layoutlib isn't working anymore, and we'll now have to use a wrapper similarly to what we use in ADT in the project callback. We should probably provide a single int[] wrapper class in layoutlib API for all to use. Change-Id: I4d7d038540f8a24541a588696f1059a020b589e5
* | | Layoutlib: Properly dispose of bitmap delegate.Xavier Ducrohet2010-11-183-91/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by initializing the android.util.Finalizers that's reponsible for calling out to the native bitmap destructor. Also implemented the native bitmap destructor Also fix Bridge by removing obsolete API methods, and removing some unneeded synchronized blocks now that the whole rendering (and scene creation) is protected by a synchronized on the bridge object anyway. Change-Id: Ie1792da6db354836542dfc11f457fe4a6d78ddfb
* | | Layoutlib: support XML based ColorStateList.Xavier Ducrohet2010-11-171-7/+34
| | | | | | | | | | | | | | | | | | This fixes the rendering of the TabHost in Eclipse. Change-Id: I333c4d65b18df76871e24a04f0a888ae42ba40ef
* | | Layoutlib: Fix alpha support in Canvas/Paint.Xavier Ducrohet2010-11-122-42/+21
| | | | | | | | | | | | Change-Id: I359098cfc542a7a0b7d99478c0eb13587b4439d0
* | | Layoutlib: Fill the default prop value map for View objects.Xavier Ducrohet2010-11-123-28/+33
| | | | | | | | | | | | Change-Id: I35426ced17a10eb092fac2153276f1202692876f
* | | Fix fill color alpha in layoutlibTor Norbye2010-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new Color(int) ignores the upper 8 bits - it creates a color without an alpha channel. In order to pass in rgba we have to use a different constructor, new Color(int,true). (In the layout library API we should also specify that the custom color, if specified, needs to include an alpha, or in particular add in 0xFF<<24 if the color is opaque.) Change-Id: I1c44caed8a5780e61b1c799f3b45bef3eb7bc97b
* | | Misc fix in layoutlib bridge + View.isIneditMode as delegate.Xavier Ducrohet2010-11-118-34/+56
| | | | | | | | | | | | Change-Id: Ideab29167e933203da99d4270cebcb777726201f
* | | Layoutlib: New bridge implementation using the new API 5.Xavier Ducrohet2010-11-1140-1098/+1326
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the new API prepare for stateful layoutlib, major reorganization of the code. New "android" sub-package for all extended android classes. Also moved BridgeInflater in here so that all extended classes are in this package. Only delegates and classes replacing renamed classes are in their original android.* packages. Also created full file for the empty implementations of IWindow and IWindowSession. New "impl" for the dirty work implementation. Main package contains the basic implementation of the API. Most of the code that was in Bridge is now in .impl.LayoutSceneImpl, with the main init/inflate/render code split into the contrustrutor, inflate() and render(). Change-Id: Ie15b15e5a1b2388cd6ef82e518345b1fc02ec981
* | | Layoutlib: Load fragmentsXavier Ducrohet2010-11-085-8/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change does the following: - Make the bridge context extend Activity instead of Context so that it can act as a view factory. This is needed because the Activity is used as factory for Fragment objects. - Override the default Fragment.instantiate(...) method through a delegate. This is done to load the Fragment classes located in the project (similar to custom views). Change-Id: If62e7c9ff2b7585677077ad825aa1c3591d1b5e0
* | | Layoutlib: more text drawing.Xavier Ducrohet2010-11-082-11/+9
| | | | | | | | | | | | Change-Id: I32f46d23e746b095be0577a53b61567a868f0b8a