| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Change-Id: I821191a40012e9727b4a3573d580483c3ae1de48
|
|
|
|
|
|
|
| |
If the font being loaded is a system font, then we can find the font
file and manually load it.
Change-Id: I95473b1f1b88df64316b77c41ed05d4d09ab61ed
|
|
|
|
|
|
|
|
| |
Also parse fallback_fonts.
This lets layoutlib automatically use the same fonts as the base
platforms, for instance it now uses the new ICS fonts.
Change-Id: Id6e778dc0e3f2a9112601e0eaf8499a9713ec433
|
|
|
|
|
|
|
|
|
|
|
|
| |
This include a fix in layoutlib_create to properly handle
delegating a static method of an inner class (was broken and
only worked on non static method).
Added a few comments here and there to *_Accessor classes so
that it's a bit more obvious what they are for and how they are
used.
Change-Id: Ifc31dd1a006393bb0c08e22b6a17f500dd62e090
|
|
|
|
| |
Change-Id: I1758f8ce861240d72113aa23dcbef5a52abade56
|
|
|
|
| |
Change-Id: I4aeadfbaf8a4f6a459fa19937c21ac23d9e5fb64
|
|
|
|
| |
Change-Id: I873adb7345514be6daa5c4fea4ebabb515f203e2
|
|
|
|
| |
Change-Id: If2ce0b683da8cce01679322d503eed8dd474e521
|
|
|
|
| |
Change-Id: I49306868cd8a41b6b7d919c3e8b108d5c014530e
|
|\
| |
| |
| |
| |
| |
| | |
hc-mr1." into honeycomb-mr2
* commit 'abc838716816107754ab0479242d03807ce79fc2':
Import the Layoutlib from hc-mr1.
|
| |
| |
| |
| |
| |
| | |
This is squash commit of all the missing patches.
Change-Id: Ie081c46a173290646deddbde503a720d50c4400f
|
|/
|
|
|
|
| |
LayoutLib: don't render when shader's local matrix is set to 0 scale.
Change-Id: I02c0ddd856026357f468dcc8b81e0520470118de
|
|
|
|
|
|
| |
Looks like Java2D and Skia go in different directions for angles.
Change-Id: Ia0c9c70cd66c9a0941fa9921fecf8e4e83538af3
|
|
|
|
|
|
|
|
|
|
|
| |
Commented out a Capability that is not in ADT 10.
BridgeTypedArray.getDimensionPixelSize shouldn't call
getDimension since most of the code is duplicated, and
it prevents use from properly detecting malformed attribute
values.
Change-Id: I005b17061590dc0668729af16e896fad815f1973
|
|
|
|
| |
Change-Id: Ib62b5df0361ba81846483b1e5f8d7cbdbcb57d40
|
|
|
|
|
|
| |
Fixes http://b.android.com/15007
Change-Id: Iff06180def92c5fa25e82520b76192c089edd8cc
|
|
|
|
| |
Change-Id: If4263c7dba63a063f84e0c6988c270eb6d291ac3
|
|
|
|
|
|
|
| |
- implement some Paint methods that are needed for 2.x
- fix the phone system bar to display the icons on the right.
Change-Id: I3a938b14ec9a449dbc23a33303a3c8405a5369a8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an object is given a delegate to hold onto, keep
the reference to the delegate instead of its native integer.
Also change the way the finalizer works by not explicitely deleting
the delegate. Instead we want the delegate to be deleted when
nothing holds a reference to it. To do this, instead of using
a regular SparseArray, we use a SparseArray of WeakReferences.
Because the main Java object that "owns" the delegate does not
actually holds a reference to the delegate, we fake this by
having the delegate manager hold a reference to delegates for
the main object. This is added/removed as the object is created
and the native finalized is called.
This makes layoutlib behave more like the JNI code where the native
objects are reference counted, and where the Java object can be
deleted but the delegate it owns is kept around (usually because
another type of delegates hold a reference on it.)
To properly handle the WeakReferences, we need to be able to
regularly clear the SparseArray of WeakReference that were
referencing objects that have been GC'ed.
Since the SparseArray is regularly being compacted (actually only
when items are removed), we use a custom SparseWeakArray (started
as a straight copy of SparseArray) that handles the WeakReference
and takes care of compacting the array by removing deleted indices
and WeakReference that returns null. Since our specific use case
doesn't call actually delete() or remove(), the compacting
only happens when the array needs to be resized.
Change-Id: Iacc5c1ff5b21732b8816fda87eb090da12d034e0
|
|
|
|
|
|
|
| |
We need to move away from throwing anything and instead
log errors/warnings.
Change-Id: Ib1af71a90c06e8565fbd0c061ba56f4d19baa3df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every method implementing a delegate needed by the
layoutlib_create bytecode modification must now be
annotated with LayoutlibDelegate.
The methods in the original source code that are delegated
are already automatically annotated. Now with the implementations
being annotated we can do bi-directional tests and find not
only missing implementations but also dead obsolete code.
This will be useful when backporting to earlier versions of
Android, or when native (non public) method disappear. In fact,
the new test detected one such method in Shader.
Change-Id: I491708b68ac2736ca5669aa86cd5e930a00f9db3
|
|
|
|
| |
Change-Id: I926531e9ad4a7b98e04e23cac3837794f7c89449
|
|
|
|
| |
Change-Id: Ie61a0a5b4426e64bb71a22d76d05efa4c0865e5e
|
|
|
|
|
|
|
| |
Also a few generic fixes in the layoutlib itself to support
this.
Change-Id: Ie3f24c9056bd3cc72f39f8a4f2c0861be15bff55
|
|
|
|
| |
Change-Id: I30d83c2bb4569513f4f5e22670cffe938706f105
|
|
|
|
|
|
|
| |
Also display placeholders for status/title/action bars depending
on if the app is a tablet and its theme.
Change-Id: I651c1a2e5cfde165e004c11b236e6df056853dec
|
|
|
|
|
|
|
| |
android.os.Build is now initialized from the build properties
parsed from the SDK build.prop file.
Change-Id: If16953215ca90fb0beacb51bf405b89a5c8a34fa
|
|
|
|
|
|
| |
Also change some resource.resolve tags to resource.format
Change-Id: I3f0b0d2eb69a5ec98375e4014a3bb1bfceb8c855
|
|
|
|
|
|
| |
Stupid indices.
Change-Id: I1dbdd04b8f25a5769de8dc21e6c513cef3e35635
|
|
|
|
| |
Change-Id: I29dd578ae16405358d3673caf13528be393f0967
|
|
|
|
| |
Change-Id: Ib85272249d285ecef409bf063903bcd91514a424
|
|
|
|
| |
Change-Id: I37cad7e2efb959202960c57b271c55c759867139
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It looks like the device implementation of Integer.parseInt
is able to handle converting hexa value > 80000000 while the
desktop VM cannot.
This patch provide a fix for this.
While implementing it and running the TestDegates test I realized
that some delegate methods for Region were mising, so this adds them
too.
Change-Id: Ifee1efd47c8c52adc2f4658ec4fc8bd55adb84b4
|
|
|
|
| |
Change-Id: I586f1d5ecc4f254fc04ea1171eb499d06ac592eb
|
|
|
|
| |
Change-Id: I3a48f84678f62d669d303fc73b041bb3fe5f333b
|
|
|
|
| |
Change-Id: Ife70a4707c113f4a2aed18e303cb2f221c73db2a
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Iabe081c20b361b034c2e66b975b8756c0fdcd3d1
|
|
|
|
|
|
|
| |
also finish supporting some clip operation
on the canvas.
Change-Id: I743b9e52a7aa6e9340506f1c904cc1cfbf3ff81f
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I703c2bdf51380b54fd5c20b08d3bc74833d9bc6e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Change-Id: I78929df621f48e85d9cbefe1f5590f9ce99bbaff
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
- fully support canvas transform
- fully support shader local transform
- fix repeat/mirror issue in the negative values.
Change-Id: Ib2aa7ade1c2702da4364cbda9a5a3ae72c1d3174
|
|
|
|
| |
Change-Id: Ia73fab1be3c01e6ce5791973e636e45a0f75ceb6
|
|
|
|
|
|
| |
LayoutLib now compiles against a prebuilt of ninepatch.
Change-Id: I0a1ca60af90933c171ab3aa456b47f0329df2f55
|