summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android/graphics
Commit message (Collapse)AuthorAgeFilesLines
* LayoutLib: Fix ring rendering.Deepanshu Gupta2015-10-071-0/+73
| | | | | Bug: http://b.android.com/65503 Change-Id: I6ed901703cffee345f3083ea3ddeb52a28f4ac64
* Merge "Skip drawing empty shapes to keep Apple JRE happy." into mnc-ub-devDeepanshu Gupta2015-10-071-0/+8
|\
| * Skip drawing empty shapes to keep Apple JRE happy.Deepanshu Gupta2015-10-071-0/+8
| | | | | | | | | | Bug: http://b.android.com/178278 Change-Id: I693912678ed79e9c6690560b618a605da5a807c6
* | Implement Path.approximate and add PathMeasure supportDiego Perez2015-10-072-44/+245
|/ | | | | | | | | | | 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
* LayoutLib: Fix bitmap scaling.Deepanshu Gupta2015-10-051-0/+1
| | | | | Bug: http://b.android.com/187939 Change-Id: I20bf61746e8af3bb87ba9cfcc9bf58854ac7c5be
* Reduce the amount of allocations on Paint_DelegateDiego Perez2015-09-302-19/+61
| | | | | | | | | | When the text properties of the Paint object are updated, or when .set() is called, updateFontObject will be called. This method is currently at the top of the methods for number of allocations. This CL reduces the number of calls to updateFontObject by a 90%, reducing the number of Font allocations. Change-Id: I3e232f9e6e230da8ecdd19921faadf2d3f4ff763
* Fix Matrix_Delegate.native_getValues()Deepanshu Gupta2015-08-031-1/+1
| | | | | | | The bug manifested itself by not rendering the wifi icon in the status bar. Change-Id: I7debf3eef387965d774bf66e856812e67c8552a7
* Fix bugs introduced in 78aa664.Deepanshu Gupta2015-07-311-9/+8
| | | | | | | | 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
* Poor implementation of Path.approximate()Deepanshu Gupta2015-07-291-3/+53
| | | | | | | | | | | 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
* Fix Paint_Delegate.native_getRunAdvance()Deepanshu Gupta2015-07-071-1/+2
| | | | | Bug: 22249573 Change-Id: I29f7abe6448f439059547e1c1e310d3d651ac2d8
* am fa794eb0: am 2f710356: am 13c06d6c: am 1f33bdad: am 5e50e00c: Merge "Fix ↵Diego Perez2015-06-152-2/+6
|\ | | | | | | | | | | | | for shadows on theme editor" into lmp-mr1-dev * commit 'fa794eb0025dbec6c1b90135495081d42f06bdaf': Fix for shadows on theme editor
| * am 2f710356: am 13c06d6c: am 1f33bdad: am 5e50e00c: Merge "Fix for shadows ↵Diego Perez2015-06-152-2/+6
| |\ | | | | | | | | | | | | | | | | | | on theme editor" into lmp-mr1-dev * commit '2f7103565cf1732d6d1281195cfa49a1564751d7': Fix for shadows on theme editor
| | * Fix for shadows on theme editorDiego Perez2015-06-022-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the preferred ColorModel doesn't support alpha, the shadows are incorrectly rendered. In the theme editor on Linux, the graphics device object doesn't support alpha so we need to use a different color model. We default to ARGB which works fine. Change-Id: I3e71e3d086fa4975a9149d36792e574813f37dfd
| * | am ffeb8117: am 9c13c8de: am bc47abe4: Merge "Make sure shaders use a color ↵Diego Perez2015-05-074-8/+19
| |\ \ | | |/ | | | | | | | | | | | | | | | model compatible with the destination." into lmp-mr1-dev * commit 'ffeb8117b139f61dd7c92bda6a7d47b83871cb66': Make sure shaders use a color model compatible with the destination.
| | * Make sure shaders use a color model compatible with the destination.Diego Perez2015-04-154-8/+19
| | | | | | | | | | | | | | | Change-Id: Iaf6e14bb86835c36a5b0c37519ac2ee794d10081 (cherry picked from commit 158ac454073a460375123d7d05152a7c6490efb6)
* | | LayoutLib: Change nullity annotations.Deepanshu Gupta2015-05-226-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch from using tools nullity annotations (com.android.annotations) to android framework annotations (android.annotation). A new sdk-common prebuilt is required for LayoutLib tests. The new sdk-common requires an updated tools-common. The updated tools-common doesn't have nullity annotations. So, instead of adding the annotation dependency, just reuse the platform ones. This also paves the way to include other platform annotations like IdRes etc. Change-Id: I87b8f767d3681d914abe7d1329e26a87f49f50a7
* | | Add LayoutLibDelegate for new Bitmap method.Deepanshu Gupta2015-05-211-0/+7
| | | | | | | | | | | | | | | | | | Original method added in: 721ae5fec5f1fd4f93aa2a361a0ac298e15ce353 Change-Id: Ie14d132459638cf103c390fae3f4c0c02bef2f34
* | | Update rendering fidelity tag to use constant.Deepanshu Gupta2015-05-131-4/+4
| | | | | | | | | | | | Change-Id: If6c1076aa1e070c6bda7be16516fe0e18a95fe2d
* | | Add missing delegates for M preview.Deepanshu Gupta2015-05-137-98/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove ICU dependency (use the version bundled with platform). - Restructure intelliJ project to move dependencies to module. - Minor fixes to layoutlib tests. TODO: - Load ICU data. - Hyphenator doesn't work. - High quality line breaker not present. Change-Id: I965e096e17bfc97ee995a649c3f4f6f64bb4f70d
* | | Revert "Anti-alias by default"Chris Craik2015-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:20948129 Keep HIDDEN_DEFAULT_PAINT_FLAGS name. This reverts commit 1b60cc0529161b5eca6407b551d67d355994c567. Change-Id: I97cd9c556375c74c52b006bda4fc7b3a2cfa89e1
* | | Merge "Fix view outline for shadows in LayoutLib." into mnc-devDeepanshu Gupta2015-04-271-2/+5
|\ \ \
| * | | Fix view outline for shadows in LayoutLib.Deepanshu Gupta2015-04-271-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the bounds on the drawable before getting the view outline for shadow. Also, reuse the temp outline object in AttachInfo rather than allocating a new one each time. Change-Id: I69793d38d60c5b9f9050569f2b22fbc7b90620bf
* | | | Expose drawTextRun publiclyRaph Levien2015-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For correct low-level drawing of low level text, a method that includes context for shaping is necessary, and it's similarly useful to provide the direction explicitly rather than running the BiDi algorithm on the text. The drawTextRun method (in both char[] and CharSequence variants) has provided this functionality for several major releases but has been internal. This patch exposes the methods publicly, and also improves the doc strings for both the new method and some related ones. Bug: 20193553 Change-Id: I9be33ca5ae3e7db2b69a56298400671d5ef8ad05
* | | | Anti-alias by defaultChris Craik2015-04-271-1/+1
|/ / / | | | | | | | | | Change-Id: I19434717dd3af4fdcffbfcca2ffbb485dfebe644
* | | am e2b85016: am ce2b74f7: am e51f5cdc: am e97079d9: am a16bb347: am ↵Deepanshu Gupta2015-03-251-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | 44fea603: Merge "Fix RoundRect radius." into lmp-dev * commit 'e2b8501695c4ba5712d49313e86a566e95a5b0df': Fix RoundRect radius.
| * | am e51f5cdc: am e97079d9: am a16bb347: am 44fea603: Merge "Fix RoundRect ↵Deepanshu Gupta2015-03-251-2/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | radius." into lmp-dev * commit 'e51f5cdcf34fe127792a177a3953dad03ef23647': Fix RoundRect radius.
| | * Fix RoundRect radius.Deepanshu Gupta2015-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | Android APIs use radius for measuring the corner's curvature, but Java2D APIs use diameter. Add the missing conversion. Change-Id: I630fc8712e8301324c641885c0c4adf644d13b7e
* | | Merge "Make sure shaders use a color model compatible with the destination."Diego Perez2015-03-194-8/+19
|\ \ \
| * | | Make sure shaders use a color model compatible with the destination.Diego Perez2015-03-124-8/+19
| | | | | | | | | | | | | | | | Change-Id: Iaf6e14bb86835c36a5b0c37519ac2ee794d10081
* | | | am 3d024d4c: am 65215edd: am f0d324e5: am 71ba1230: am efc09c64: am ↵Deepanshu Gupta2015-03-131-16/+9
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | 78660423: Merge "Fix cyclic dependency in BlendComposite and BlendingMode." into lmp-dev * commit '3d024d4c22b896c95ef4c98610c3db7c58a639ed': Fix cyclic dependency in BlendComposite and BlendingMode.
| * | am 65215edd: am f0d324e5: am 71ba1230: am efc09c64: am 78660423: Merge "Fix ↵Deepanshu Gupta2015-03-121-16/+9
| |\ \ | | |/ | | | | | | | | | | | | | | | cyclic dependency in BlendComposite and BlendingMode." into lmp-dev * commit '65215edd7acada70c2bcb060daec6ff718ae92ba': Fix cyclic dependency in BlendComposite and BlendingMode.
| | * Fix cyclic dependency in BlendComposite and BlendingMode.Deepanshu Gupta2015-03-111-16/+9
| | | | | | | | | | | | | | | | | | | | | Introduced in commit 1a10ca7e526736b4fd143f7c9f3b29643c0062a4 Bug: http://b.android.com/159708 Change-Id: I6add5be3a933bbe4f8d888906e2aa1b2e35d045a
* | | Cleanup Bitmap JNI attempt #2John Reck2015-03-051-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | Original version missed a spot This reverts commit c02977e3bbfaaedcb1b1d67e1692becc7dddd59b. Change-Id: I56244ce10d709fcdef42a001fe4c6ba7b6bbb04d
* | | am 70775bed: am fb96187b: am 32dc37b7: am f2c1c096: am 6ed9b75a: am ↵Deepanshu Gupta2015-03-022-517/+37
|\ \ \ | |/ / | | | | | | | | | | | | | | | 72d75f8d: Merge "Correct PorterDuff filters." into lmp-dev * commit '70775beddd3773a942084f5ef939da0a70065475': Correct PorterDuff filters.
| * | am fb96187b: am 32dc37b7: am f2c1c096: am 6ed9b75a: am 72d75f8d: Merge ↵Deepanshu Gupta2015-03-022-517/+37
| |\ \ | | |/ | | | | | | | | | | | | | | | "Correct PorterDuff filters." into lmp-dev * commit 'fb96187bb6004e5d0b22e4d942aa236a08d8913b': Correct PorterDuff filters.
| | * Correct PorterDuff filters.Deepanshu Gupta2015-02-262-517/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Remove unused modes - makes the class more manageable, and missing modes can always be readded from the git history. 2. Reuse the existing BlendComposite instances where possible. 3. Fix incorrect alpha computation for multiply mode. 4. Change the alpha computation for all blend modes to compenstate for the fact that the color filter image that we create extends beyond the image it is inteded to be applied to. Change-Id: Iedebf289a23325ee4c6d406dcad46a9edb1855c7
* | | am 0a300b89: am ad879adb: Merge "Add Asset management support for fonts." ↵Deepanshu Gupta2015-02-171-5/+96
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | into lmp-dev automerge: 0684991 automerge: c2fa5e2 automerge: 7bf58d0 * commit '7bf58d0c5523a9b76ab1d570acb92514e8fff8ba': Add Asset management support for fonts.
| * | am 0a300b89: am ad879adb: Merge "Add Asset management support for fonts." ↵Deepanshu Gupta2015-02-171-5/+96
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | into lmp-dev automerge: 0684991 automerge: c2fa5e2 * commit 'c2fa5e205e617df6b622cb54fac77738e82e6320': Add Asset management support for fonts.
| | * Add Asset management support for fonts.Deepanshu Gupta2015-02-031-5/+96
| | | | | | | | | | | | Change-Id: I10ca67dcffe244667d4ae0bda65dbc1aa6691d50
* | | am 940a1e56: am 52a60ff6: am 302a7cc1: am 4628d51a: am 141c7614: Merge "Fix ↵Deepanshu Gupta2014-12-041-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | AnalogClock rendering" into lmp-dev * commit '940a1e563fd94f912a7322cea8f0a5662b79050f': Fix AnalogClock rendering
| * | am 52a60ff6: am 302a7cc1: am 4628d51a: am 141c7614: Merge "Fix AnalogClock ↵Deepanshu Gupta2014-12-041-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | rendering" into lmp-dev * commit '52a60ff6366a4f5cf1ed9697b7cebd6f9300de2b': Fix AnalogClock rendering
| | * Fix AnalogClock renderingDeepanshu Gupta2014-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Change calls to java.lang.System.log* since they don't exist on the host. 2. Clean up method rewrite mechanism in ReplaceMethodCallsAdapter. 3. Stub out creation of uninitialized GregorianCalendar. 4. Memory map the time zone data base file and provide a custom implementation of BufferIterator for use by ZoneInfoDB 5. Delete unused Time_Delegate Also fixed a comment in BridgeAssetManager and an error message in FontFamily_Delegate. Bug: http://b.android.com/79160 Change-Id: Iae5ef65678f0e6c7c5af520c45bd15980ce3fa55
* | | am 9713d740: am 0e3925df: Merge "Remove needlessly thrown IOException." into ↵Deepanshu Gupta2014-11-101-5/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | lmp-dev automerge: f305d2c automerge: a09dda8 automerge: aa53920 * commit '9713d740182f37f15849997979384fde00a1f9c1': Remove needlessly thrown IOException.
| * | am 0e3925df: Merge "Remove needlessly thrown IOException." into lmp-dev ↵Deepanshu Gupta2014-11-101-5/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | automerge: f305d2c automerge: a09dda8 automerge: aa53920 * commit 'aa53920479b7e1916e0d2afbf6846250a2deeabf': Remove needlessly thrown IOException.
| | * Remove needlessly thrown IOException.Deepanshu Gupta2014-11-061-5/+2
| | | | | | | | | | | | Change-Id: If34986367554c98f96f6f9a1088f5e25077a1be1
* | | am c719872b: am 22387d9d: am 01c80f15: am 37779f07: Merge "Check Bridge init ↵Deepanshu Gupta2014-10-223-34/+20
|\ \ \ | |/ / | | | | | | | | | | | | | | | before disposing." into lmp-dev automerge: 568f16c * commit 'c719872b4e4eb9329eab4ce9f3976a44e142e141': Check Bridge init before disposing.
| * | am 22387d9d: am 01c80f15: am 37779f07: Merge "Check Bridge init before ↵Deepanshu Gupta2014-10-223-34/+20
| |\ \ | | |/ | | | | | | | | | | | | | | | disposing." into lmp-dev automerge: 568f16c * commit '22387d9d3529515e64dfc01e81f14fddb2da463c': Check Bridge init before disposing.
| | * Check Bridge init before disposing.Deepanshu Gupta2014-10-203-34/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases ADT may dispose the Bridge even before init is called on it. This caused an NPE. Fixed this by checking for the initialization before disposing resources. Bug: http://b.android.com/77726 Change-Id: I741d6ea3595a3b7cb816abd0417f23aecca6370e
* | | Ensure that all requests for the Paint's nativePtr use p.getNativeInstance()Derek Sollenberger2014-10-171-26/+26
|/ / | | | | | | | | | | | | Since requesting the native pointer triggers specific paint behavior we need to ensure that the field is private and that callers use the public method. Change-Id: I598a8bf2904960023397728c1ce4502ce408348e
* | resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aospNeil Fuller2014-10-022-8/+3
|\ \ | |/ |/| | | Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7