summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* LayoutLib: display warning when a resource reference fails to resolve.Xavier Ducrohet2011-01-092-52/+70
| | | | | | Also fixed some warnings where a field hid one from a parent class. Change-Id: I04ed19ebc49ae0bb0abdb0b25bc1c182fa0db440
* LayoutLib: Fix moveChild animation.Xavier Ducrohet2011-01-093-56/+97
| | | | | | | | | | Only support animation for view move inside the same layout. Also fix animation thread to property support multiple animation running at once. Change-Id: I45cad84e7b9f3a4f281c956d32934eb74e807afb
* LayoutLib: add a few misc implementations.Xavier Ducrohet2011-01-074-25/+48
| | | | Change-Id: I586f1d5ecc4f254fc04ea1171eb499d06ac592eb
* LayoutLib: finish Typeface and unload them in dispose.Xavier Ducrohet2011-01-073-5/+11
| | | | Change-Id: I3a48f84678f62d669d303fc73b041bb3fe5f333b
* LayoutLib: remove fade in/out transition on moveChild.Xavier Ducrohet2011-01-071-19/+30
| | | | Change-Id: I69a70ecb165f19feca55fc30a3f48ebea896daa3
* LayoutLib: fix moveChild again.Xavier Ducrohet2011-01-072-3/+25
| | | | Change-Id: Ib69a06e44be1e332f0f43c36c795c86270cb1b71
* LayoutLib: fix animated moveChild.Xavier Ducrohet2011-01-072-18/+80
| | | | | | | | The child can only be added to the new viewgroup after it's been removed from the previous one, which is delayed if there's an animation. Change-Id: I9123a2670d0d17b3eb6f8f89085ebab8ca2b800f
* LayoutLib: Finish the matrix delegate.Xavier Ducrohet2011-01-063-12/+55
| | | | Change-Id: Ife70a4707c113f4a2aed18e303cb2f221c73db2a
* LayoutLib: fix clipping issues.Xavier Ducrohet2011-01-063-14/+87
| | | | | | | | | | | | There were two issues: - Graphics2D.setClip only works on rectangular shapes. This means doing a setClip on a non rectangular shape should basically reset the clip and intersect with the new shape. - the current clip can be null, so the combineShape method must handle it. Change-Id: Id2cd7475e991d8b533ff2e8850cc2c27663f9e52
* Cherry-pick 9b53dd9d60a01ddb1307177c296c7b4fd6114753 from masterXavier Ducrohet2011-01-061-17/+11
| | | | | Change-Id: I670872542feb62c47fe693eb183b19e2eef2b20d LayoutLib: use new API with log in init method.
* Add new "animator" and "interpolator" resource directories.Dianne Hackborn2011-01-051-1/+52
| | | | | | First phase, allowing apps to move over to the new names. Change-Id: Ia16f3e2383e4a6599a0011d0464f0aacb1ce9207
* LayoutLib: Misc javadoc fixes.Xavier Ducrohet2011-01-035-15/+15
| | | | Change-Id: Iabe081c20b361b034c2e66b975b8756c0fdcd3d1
* LayoutLib: Support Region through delegates.Xavier Ducrohet2010-12-247-98/+415
| | | | | | | also finish supporting some clip operation on the canvas. Change-Id: I743b9e52a7aa6e9340506f1c904cc1cfbf3ff81f
* LayoutLib: add support for unsupported drawing modifiers.Xavier Ducrohet2010-12-2423-334/+906
| | | | | | | | | | | | | DrawFilter, Rasterizer, ColorFilter and MaskFilter are not supported but we need to provide their JNI counterparts anyway, to at least display warnings when they are used. Also improved the API to query Paint for Shaders and PathEffects, and clean up some code by moving asserts into the DelegateManager. Change-Id: I8942514565d28576d5608c6373bda25d86d42ff2
* LayoutLib: Fix Canvas layer support with 2+ layersXavier Ducrohet2010-12-241-69/+121
| | | | | | | | | | | | | | | | | | | | | | | | | - When drawing is not clipped to the top layers, drawing should not happen automatically on all existing layers. Instead each layer's flags dictate whether drawing should happen on layers beneath, starting with the top layer. - upon restore, the same mechanism is taken. Only blit a layer into the layer beneath if it was drawn into using the logic above. Also fixed: - saveLayer() does not, in fact, always save matrix and clip info. The flag dictate this, the same way it does in save() - drawing code didn't properly detect the case of drawing into layers if a save() was called after saveLayer(). Now the code only looks at the layer list which provide all the needed info (flags mostly), and doesn't rely on mLocalLayer (which is used during restore only now). - Properly handle HAS_ALPHA_LAYER_SAVE_FLAG (or lack thereof) when creating the BufferedImage for the layer. Change-Id: I2fbbcc0f5d3a3dd208763705bc23e6658fd4e573
* LayoutLib: improve bitmap support.Xavier Ducrohet2010-12-225-184/+512
| | | | Change-Id: I703c2bdf51380b54fd5c20b08d3bc74833d9bc6e
* LayoutLib: support for layers.Xavier Ducrohet2010-12-228-562/+880
| | | | | | | | | | | | | | | | | | | | | | | Layers require that drawing methods potentially draw in more than one bitmaps. To handle this this patch offers the following: - move all drawing methods to use Drawable - Drawables are now handled by GcSnapshot since its the one handling the layers - moved Canvas_Delegate.createCustomGraphics to GcSnapshot which does not expose the Graphics2D objects anymore so its draw() methods are the only way to draw. - handles creating layers in GcSnapshot.save() and blitting them in restore() Other changes: - Clean up the create/save API in GcSnapshot - Fixed drawing bitmaps with alpha and other composite modes. Change-Id: I1e230087493d044a10de71f4b6d29083e3f3bf64
* LayoutLib: Misc rendering fixes.Xavier Ducrohet2010-12-219-99/+155
| | | | | | | | | | | | | | | | | | | | | | - always set up the stroke. Paint may not have the proper style when drawing lines. stroke should still be setup. - Fixed vertical linear gradient. Old code generated a gradient ratio of NaN - Fixed alpha rendering when using shaders. In that case the alpha channel from the paint color should be used in conjunction with the shader. - Fixed miter limit. Java expects the value to be multiplied by the stroke width - Fixed support for drawing ALPHA_8 bitmaps. Java2D doesn't have bitmaps with only alpha channels, so we keep using ARGB bitmaps but when drawing them into a bitmap we erase the color information. Change-Id: I4f04341fc843e3f7dadd1fdbf709b11a4f1e24b9
* LayoutLib: support for Path and BitmapShader using delegates.Xavier Ducrohet2010-12-2125-802/+1900
| | | | | | | | | | Also created delegates for all missing shader, xfermode and patheffect classes. Moved the logic of the xfermode, and patheffects that was in Canvas_Delegate into the xfermode/patheffect classes, and added support (in all 3 clases) for knowing if the shader/xfermode/patheffect is actually supported or not. Make use of fidelityWarning in LayoutLog if they are not.
* 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
|\ \ \