History log of /frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9d76581faf9eb5f47eff922c14807e51702f363b 14-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Fix Arc rendering.

Looks like Java2D and Skia go in different directions for angles.

Change-Id: Ia0c9c70cd66c9a0941fa9921fecf8e4e83538af3
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
adaa12cd9e421edf34e36de8cfacc3e3c334bb64 08-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix Capabilities and getDimensionPixelSize

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
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
c12b4093517ac99cabd91a1bb4bdb3bacfe4bcfd 08-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Implement some missing add###() method in Path.

Change-Id: Ib62b5df0361ba81846483b1e5f8d7cbdbcb57d40
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
f0a53435f14d23d9555fc46014352ee6a7baa647 24-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Add debug mode.

Change-Id: If4263c7dba63a063f84e0c6988c270eb6d291ac3
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
cc4977d0fdaf657907912fd6cc2f9426dc8d2e36 22-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Hold onto delegate references.

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
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
8a80a8555238cc564f445f902aff5231993a8f96 10-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: remove some exceptions.

We need to move away from throwing anything and instead
log errors/warnings.

Change-Id: Ib1af71a90c06e8565fbd0c061ba56f4d19baa3df
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
9a4fe29c8d92014d2d9a848e9116b8cc9d0842f9 10-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Annotate the custom delegate methods.

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
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
51a7e5447de94791c464cda5cc6ebbf616d73c80 15-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update logs to use new data bundle

Also change some resource.resolve tags to resource.format

Change-Id: I3f0b0d2eb69a5ec98375e4014a3bb1bfceb8c855
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
918aaa5717fce6081557c82ce1c439b6922737d5 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Use the new log tag constants from LayoutLog

Change-Id: I29dd578ae16405358d3673caf13528be393f0967
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
56222cfbe9973c518f7e8c9113c614de80b5a4b2 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: use tags in logs.

Change-Id: Ib85272249d285ecef409bf063903bcd91514a424
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
b6e53f481294aec2edac5d83d9fde81827c23bd7 08-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: add a few misc implementations.

Change-Id: I586f1d5ecc4f254fc04ea1171eb499d06ac592eb
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
10af738336cb18c5d86710b2961d91e2d3e8d410 07-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Finish the matrix delegate.

Change-Id: Ife70a4707c113f4a2aed18e303cb2f221c73db2a
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
b44b43b1579486ff7ecd0f7528f17711acdeae98 23-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Support Region through delegates.

also finish supporting some clip operation
on the canvas.

Change-Id: I743b9e52a7aa6e9340506f1c904cc1cfbf3ff81f
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
d43909c7503e11eb335a452d296a10804bb01fd6 23-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: add support for unsupported drawing modifiers.

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
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
d348b6eaa98e23cb38d90906df109aaa2d20ea7f 20-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: support for Path and BitmapShader using delegates.

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.
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java