46d43ccfd8cef75b4315828073c094cf1efb05ff |
|
03-Feb-2012 |
Xavier Ducrohet <xav@android.com> |
Make Layoutlib compile on Java 6. Change-Id: Ic8f0e321c6c218de83664fc01f253a07fa80852c
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/RadialGradient_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/RadialGradient_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/RadialGradient_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/RadialGradient_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/RadialGradient_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/RadialGradient_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/RadialGradient_Delegate.java
|
d9c64369cf9be6568af2d79c35fb470cc261730d |
|
14-Dec-2010 |
Xavier Ducrohet <xav@android.com> |
LayoutLib: Fix gradient rendering. - fully support canvas transform - fully support shader local transform - fix repeat/mirror issue in the negative values. Change-Id: Ib2aa7ade1c2702da4364cbda9a5a3ae72c1d3174
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
|
c2e9651bf386a1f7bf7fc706cf5424950570470c |
|
10-Nov-2010 |
Xavier Ducrohet <xav@android.com> |
Layoutlib: New bridge implementation using the new API 5. 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
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
|
251d2e99245095369b52d891a660b2ed270f02e0 |
|
02-Nov-2010 |
Xavier Ducrohet <xav@android.com> |
Layoutlib native delegate: primitive shapes and shaders Change-Id: Id2b0c6231589e82d8e96c9f019042eba348a6583
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
|