d88c717b4e124e435e54bf1542774aa100773c3e |
|
29-Mar-2017 |
Diego Perez <diegoperez@google.com> |
Make layoutlib more lenient with recoverable errors In many cases, throwing an exception will stop the inflation or rendering of a layout. Sometimes, we could recover from some of the failures and render a layout that is "usable". I've done a first pass trying to follow the following rules: - Try simple recoveries by choosing sensible defaults. Not trying complex recoveries. - Only recover if the exception is not part of the class behaviour. Avoided removing declared exceptions or exceptions that are expected by the framework. - I've kept assertions in place so, in most cases, the behaviour will be almost identical to the previous one with assertions enabled. Test: Checked with existing tests Change-Id: I0001fdd3c808cf405c4eb8d734b9bbe63493e05c
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
39bdc174ae51f85ec65983314d4aa18de02758f2 |
|
03-Jan-2017 |
Jerome Gaillard <jgaillard@google.com> |
Update layoulib following changes in Android source code This reflects modifications from Id2374bba and I99e1942d. Test: Run layoutlib tests Change-Id: I5cd56d8417b997b99be668825d950de661d75818
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
ca9be759c8ea04ad2e58db8d5b8a5bdf31078730 |
|
23-May-2016 |
Diego Perez <diegoperez@google.com> |
Fix Path_Delegate reset Path_Delegate.reset was not clearing the last point when called. This caused some vector drawables that relied on relative position to fail to render correctly. Bug: http://b.android.com/91383 Bug: http://b.android.com/203797 Change-Id: Id250ecf8a5a5c66671aa8d3ddd213996f824fd56 (cherry picked from commit d6db7133af7b5aed76d83c17b60b27742608a2df)
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
8f43dfef2bf4581fa97705ffaabf66b7568b9544 |
|
04-Apr-2016 |
Diego Perez <diegoperez@google.com> |
Update Path and RenderNode delegates to new API RenderNode_Delegate nCreate now takes a reference to this. In the Path_Delegate, the native_offset call with a destination path has been removed. Change-Id: I6332bb4733974b817e8a29eab82e2218fcf942c4
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
5ceb30f2164c745789c13bd0060e57fa8c04a8fd |
|
22-Mar-2016 |
Diego Perez <diegoperez@google.com> |
Add fill type support to vector drawable The platform has added fill type to vector drawables. This CL implements the native replacement. Also remove a couple of delegates for classes that have been removed from the platform. Change-Id: Ie6ba344db9c9c2c45cd0ef4b99f11f9d8bcfd7de
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
5d1013cf13e59b7f8dc8f16b5811cb29982e0ef3 |
|
23-Feb-2016 |
Diego Perez <diegoperez@google.com> |
Implement native methods in VectorDrawable Most of the VectorDrawable implementation has been moved to native code. This CL implements most of the required functionality that existed in Marshmallow. Change-Id: I009bcd5c166f2bfa0795d2718fabab4a549eba9f
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
491523d52cd8368ef9a92e95fb3e9332bf86a996 |
|
07-Oct-2015 |
Deepanshu Gupta <deepanshu@google.com> |
LayoutLib fixes for N Moves LayoutLib to Java 8 - YAY! Fix delegates Change-Id: I098996e43e330e995d33f12df1c16355bbc02f0f
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
3381cde9f293c52f195b31b0e4049649db31181a |
|
05-Feb-2016 |
Jerome Gaillard <jgaillard@google.com> |
Layoutlib supports rounded corners of different sizes Bug: http://b.android.com/29098 Change-Id: I4e7dc3810559b509baf5ea306221c1d2504be0e1
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
b9c48d8f49d35e2682c7205a9d8d5fcc25d7c736 |
|
18-Dec-2015 |
Diego Perez <diegoperez@google.com> |
New path interpolation to paint vector drawables Before this CL, PathMeasure_Delegate would use Path_Delegate.approximate to get a path segment to draw. Path_Delegate.approximate uses a flattening iterator to do the path approximation. Unfortunately, because we do not control the stroke mode while painting, in some cases the approximation would draw unwanted artifacts caused by the rough approximation and the use of wrong miter values. This CL does a much better calculation of the path and interpolates the segments of the curves instead of replacing them with line segments. This also fixes an issue with the calculation of empty paths. Bug: http://b.android.com/187256 Change-Id: I450f7aa4c3d9efcbf902a40c3b4d6d388546893f
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
081cebf52b19e848c07fb781b35fa1f96695c311 |
|
07-Oct-2015 |
Diego Perez <diegoperez@google.com> |
Implement Path.approximate and add PathMeasure support PathMeasure is needed to use the trimPath* properties in drawables. These properties are used in the vector drawable for indeterminate progress bars in Material so this is needed to be able to render them correctly in the preview. PathMeasure makes use of Path.approximate to calculate which segments to paint. Change-Id: Ic513f0a30a6aac0317f7c13cd75e9154c37405c8
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
7b1e486e8778c042eb95e1517ed4ff8cac461759 |
|
31-Jul-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Fix bugs introduced in 78aa664. Fix a couple of bugs (ArrayIndexOutOfBoundsException due to miscalculation and a typo - swapped src and dst) introduced in the CL: 78aa664 Poor implementation of Path.approximate() Change-Id: Iff7dbbf66d2714df51699ddb9a4169c38feefa7b
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
78aa664b027dbcebb0d0dc1dca9f3a8172d9a78c |
|
29-Jul-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Poor implementation of Path.approximate() Include a very poor implementation of Path.approximate() in LayoutLib that only returns the first and last coordinate of the path. This avoids crashing the rendering when certain assumptions are made on the value returned from the method. Also change the error to a warning. Change-Id: I9241dec734d4df90a9eebd1e6de8b3e443eee3c8
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
3b3795601051f9ae7008e2b3e29e683f5d4a2e53 |
|
17-Jul-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Fix missing initial moveto in path definition. The Path_Delegate was missing a moveTo call which resulted in IllegalPathStateException when rendering the ProgressBar. Change-Id: Ibdae5f90ffd0a71a3de4ba945238239faa0b18b2
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
bb5d0cc4369590ce892cca2f717f5d5568c5f655 |
|
26-Jun-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Update LayoutLib delegates. Change-Id: I64828bfb963048effbc49a622f5f2aa0203665e6
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
6376c407d433c91174e4cef735ddb0014461a906 |
|
15-May-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Layoutlib: Update delegates for L Update delegate method signatures for L. Change-Id: Ie607293bcae60b2d3a61d1cad3ac5f04bda2a238
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
103d40960daa0420995aa12881bef33892a0a2ab |
|
14-Mar-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Add native method delegates to layoutlib Add delegates for Path.native_isConvex and ICU.getCurrencyNumericCode. The original methods were added in 5be83edd15e11420287cc0af93a95d5a6dfae68f and d627bd4525e41b0503f94c2887c3e01618c73105 respectively. TODO: Implement Path_Delegate.native_isConvex Change-Id: If1046467d3950ab6955c6b81383a60fd6bd03fd2
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
9be03c4e980d3058aeb3fd730da5f7d4a4a4f8a8 |
|
22-Feb-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Update layoutlib tests to check methods return value. The test in layoutlib bridge has been updated to check the return value of the delegate method match the value of the overriden method. This changeset also fixes the problems found due to this change. Change-Id: I87cef323c4eaee4e9f60475f01156b276593fa50
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
98f33350b10106cda14543700a6c46032a590bb1 |
|
18-Feb-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Fix native methods Fix native method signatures as changed by the following commits: 56f57ccbd4fbbf4d572cc966d1cb76d7ae7ad334 76d3a1b8d035d27bc80b0f2fc480a903bd001514 Change-Id: I5db31d3665a5e8c84c107cf84ec3bd5ccfb9a9fe
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
34b16b854ae8c78554a75b136a1df403c385f2e9 |
|
30-Jan-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Fix build Change-Id: Ifcbf44bc310daee4410ccc6ddf6bdc44565e20da
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
e05bb956ce429618fd4f971a9dc708b9313c59ea |
|
29-Jan-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Fix native method signatures Some new methods have been added which are yet to be implemented. Change-Id: Ie5a0657c7ccbe95200c270d5c15b516a385b083b
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
bd28e2d9d3c2a7e80babd39471d5788843a48d4a |
|
27-Jan-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Manual merge of changes from klp-dev Manually merged the following changes from klp-dev branch and fixed merge conflicts: 78cfdf31b7c48589ea3a148ec1d6d573235bc06b d0581d271e814670d81a6550aa7b1e86864d5710 1f92d7fc0ffa72d7db93244c29a1a6575bb4b318 0baec410c29206dc72d9f5afba5d45827e62c00c 24541255c312ee34f9bf17eb5852cdffd4807065 Change-Id: I426729bb90a26746bfff3a0e4a03ea9f37972528
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
88a8364c386c694f7ad56662ef89713dbf7c9d63 |
|
27-Jan-2014 |
Narayan Kamath <narayan@google.com> |
Track 64bit changes to android/graphics. All pointers are now 64bits wide, so should be represented as java longs and not ints. Also changed DelegateManager and SparseWeakArray to reflect the new world order. Change-Id: Ic32b6b53818dbae9b949f03004c4fb6dae26cdbe
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
282e181b58cf72b6ca770dc7ca5f91f135444502 |
|
24-Jan-2014 |
Adam Lesinski <adamlesinski@google.com> |
Revert "Move frameworks/base/tools/ to frameworks/tools/" This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
9f6a119c8aa276432ece4fe2118bd8a3c9b1067e |
|
28-Aug-2013 |
Mike Lockwood <lockwood@google.com> |
Move frameworks/base/tools/ to frameworks/tools/ Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
|
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
|