summaryrefslogtreecommitdiffstats
path: root/graphics
Commit message (Collapse)AuthorAgeFilesLines
* Prevent memory corruption from use-after-freeJohn Reck2015-01-231-2/+3
| | | | | | | | | | Bug: 19035637 If an app tries to call recycle() on a Bitmap that has already been finalized it will result in use-after-frees. This is bad. Avoid this by setting the pointer to 0 and checking for this Change-Id: I12d73703a0f95b05fe4c2fd8e9c01b6a3f2f023b
* Avoid ripple buffer creation for empty boundsAlan Viverette2015-01-211-2/+2
| | | | | Bug: 19068439 Change-Id: I031d4303bbf101a25612dce6f02d81ce4cf58e2b
* Jump ripples to end when switching to a non-hardware canvasAlan Viverette2015-01-142-2/+2
| | | | | | | | Previously we canceled the hardware animations but neglected to reset the state, which left us drawing in the pressed state. Bug: 19020524 Change-Id: I439a18126b9093cac40006361be99f8d077b95a9
* Merge "Propagate DrawableContainer state on mutate, fix ColorDrawable ↵Alan Viverette2014-12-122-30/+53
|\ | | | | | | theming" into lmp-mr1-dev
| * Propagate DrawableContainer state on mutate, fix ColorDrawable themingAlan Viverette2014-12-122-30/+53
| | | | | | | | | | | | BUG: 18542282 BUG: 18467568 Change-Id: Id1d75cfe47fde3206ab40e5360289e0cb2504402
* | Move ripple to end state on jump when hardware exit is pendingAlan Viverette2014-12-122-10/+37
|/ | | | | BUG: 18734676 Change-Id: Ie063e1eec0b4f28f936ea27822afacfd1b72a0e9
* Fix buildAlan Viverette2014-12-101-1/+1
| | | | Change-Id: I2efdf2790aa768eaaa6e7e0b80a9ad7b2ddf3cb9
* Update tint filter after setting gradient drawable stateAlan Viverette2014-12-101-0/+2
| | | | | BUG: 18706381 Change-Id: I7d664303c9b796243da6c55d1ea9482736aabf07
* Avoid creating futures for drawables with no constant stateAlan Viverette2014-12-101-1/+8
| | | | | | | | | | | | We don't need to create futures for drawables without constant state, since we only copy on mutate and we don't need to do any work on mutate() for drawables without shared constant state. Also we would crash in that case, so avoiding the NPE is nice too. Rider: Also fixes elevations again. BUG: 18696100 Change-Id: I4d7737f39ce3efc5830704e5ce412c540603e6ac
* Teach AssetAtlas about more drawablesJohn Reck2014-12-097-7/+79
| | | | | | Bug: 18317479 Change-Id: I16868ee204d24af72af9a2efc987f7e9eb1d266b
* Merge "Fix default value of AnimationDrawable's one shot property" into ↵Alan Viverette2014-12-091-1/+1
|\ | | | | | | lmp-mr1-dev
| * Fix default value of AnimationDrawable's one shot propertyAlan Viverette2014-12-091-1/+1
| | | | | | | | | | BUG: 18676499 Change-Id: Iaaf134b3a58a04cd99db001edc4438ee75dab878
* | Fix hotspot coordinate propagation in ViewGroup and AbsListViewAlan Viverette2014-12-081-0/+2
|/ | | | | | | | | | There was a weird disconnect between setPressed() and hotspot propagation behavior. This makes hotspot propagation work like setPressed(). Also fixes ripple animation during drag-to-open. BUG: 18631557 BUG: 18593243 Change-Id: Id4adf5d815e4d426b4182aac4d0c780f04472ae4
* Merge "AVD: Deep copy the animator target setup when mutate." into lmp-mr1-devztenghui2014-12-051-1/+2
|\
| * AVD: Deep copy the animator target setup when mutate.ztenghui2014-12-041-1/+2
| | | | | | | | | | | | | | | | | | | | Only calling VectorDrawable's mutate here will miss all the animator setup, when the VectorDrawable has a new state. So we just deep copy everything and setup the animators again. b/18521582 Change-Id: Id164312750bb548f9c2d21cc0b5806cd2bafcf0d
* | Avoid extra saveLayer calls in RippleDrawable, fix docsAlan Viverette2014-12-044-196/+253
| | | | | | | | | | | | | | | | Also fixes opacity returned from InsetDrawable to accurately reflect the transparent inset area and updates button to correctly use tint. BUG: 18226391 Change-Id: Ia9a88d9d663990a6829d2f251c7f59ea2a79d816
* | Update locally cached drawables when constant state changesAlan Viverette2014-12-042-1/+18
| | | | | | | | | | | | | | | | | | | | Previously we were failing to update references to drawables that had been pulled from constant state, so we were drawing the wrong ones. Also fixes button Z translation on press, which was WAY too high. BUG: 18542282 Change-Id: Ifde7d64e31d31737854cfcbe75777e5b07a06e3a
* | Update AndroidPixelRef to prevent VM from cleaning up memory prematurely.Derek Sollenberger2014-12-031-6/+1
| | | | | | | | | | bug:18306529 Change-Id: I1ea94df1dcaf4fcf248b63dc8b0a13f36412570a
* | Update drawable container constant state following cloneAlan Viverette2014-11-264-8/+28
|/ | | | | | | | DrawableContainer's internal state was getting out of sync with the internal state of child classes because we failed to call set state. BUG: 18542282 Change-Id: Iacaa12042e99c1b9e9eaf08f0ab879d82260e7ee
* Ensure calling mutate() on DrawableContainer creates a new stateAlan Viverette2014-11-255-37/+81
| | | | | | | | | | Previously, a new state would only be created on newDrawable(), which caused the first drawable loaded for a resource to share constant state with the cached version. Even if mutate() was called, the constant state was still shared and any changes were applied to the cached copy. BUG: 18504919 Change-Id: I40d257867eb0a092ce580b9c4338ddc7406a031d
* Merge "Revert "Ensure calling mutate() on DrawableContainer creates a new ↵John Reck2014-11-255-75/+35
|\ | | | | | | state"" into lmp-mr1-dev
| * Revert "Ensure calling mutate() on DrawableContainer creates a new state"John Reck2014-11-255-75/+35
| | | | | | | | | | | | | | This reverts commit d7dab349c2af0e4bde188b1969f0c697b217dd57. Change-Id: Icc1c4bfa296a59a551088fe7cc2449a97bb2b7b7 Reason: Broke the build
* | Merge "Cannot set Pivot X,Y values from setPivotX, setPivotY API" into ↵Alan Viverette2014-11-251-4/+4
|\ \ | |/ |/| | | lmp-mr1-dev
| * Cannot set Pivot X,Y values from setPivotX, setPivotY APIjungheang.lee2014-11-211-4/+4
| | | | | | | | | | | | | | Pivot value can not be changed once they have been set to default. To be changed "==" -> "!=" in if() BUG: 18474532 Change-Id: Iacd16eb951154ea97c241566b704e0ad3f225bd1
* | Ensure calling mutate() on DrawableContainer creates a new stateAlan Viverette2014-11-245-35/+75
| | | | | | | | | | | | | | | | | | | | Previously, a new state would only be created on newDrawable(), which caused the first drawable loaded for a resource to share constant state with the cached version. Even if mutate() was called, the constant state was still shared and any changes were applied to the cached copy. BUG: 18504919 Change-Id: I1ce76fbbc144e9c0c93261e3a12cc613d0c74b83
* | Merge "Revert "Add a way to override Xfermode DO NOT MERGE"" into lmp-mr1-devChris Craik2014-11-211-9/+0
|\ \
| * | Revert "Add a way to override Xfermode DO NOT MERGE"Chris Craik2014-11-211-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature no longer needed. bug:18448377 This reverts commit 4678dcc5524258908eadc5fe1e5e1874768967eb. Change-Id: Ib0a19946e966a54857165555827b5fa7b34b6bea
* | | Merge "ASLD: ASLD's XML reversible flag can turn off the reverse behavior ↵ztenghui2014-11-202-19/+59
|\ \ \ | | | | | | | | | | | | now." into lmp-mr1-dev
| * | | ASLD: ASLD's XML reversible flag can turn off the reverse behavior now.ztenghui2014-11-202-19/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the android:reversible flag behaves like a suggestion. Now it is used to enforce no reverse when set to false. In this way, user can safely setup one direction animation only. When set to true, but AVD can't reverse , then it will show a warning. At the same time, update the tests to show different cases, including AnimationDrawable. b/18413484 Change-Id: I5552c49dcbd76b0724b4d5593bce8388b27bd905
* | | | Merge "Improve ColorMatrix docs" into lmp-mr1-devChris Craik2014-11-201-33/+61
|\ \ \ \ | |_|_|/ |/| | |
| * | | Improve ColorMatrix docsChris Craik2014-11-201-33/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:18415632 Clean up some text, and add a sample. Change-Id: I39fdda2004e1932831058701f95f67355786ad9d
* | | | Merge "Check bounds on CharSequence drawText methods" into lmp-mr1-devRaph Levien2014-11-141-0/+3
|\ \ \ \
| * | | | Check bounds on CharSequence drawText methodsRaph Levien2014-11-121-0/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The canvas drawText() methods on CharSequence arguments didn't check whether the start and end offsets were within bounds, which triggered native crashes. This patch checks the bounds and throws IndexOutOfBoundsException when invalid. Bug: 18282500 Change-Id: I1935bf21f828b960c817b40ebce6affd4ce8bb99
* | | | Merge "Set current degrees when updating RotateDrawable from typed array" ↵Alan Viverette2014-11-141-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | into lmp-mr1-dev
| * | | | Set current degrees when updating RotateDrawable from typed arrayAlan Viverette2014-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This regressed after enabling theming in RotateDrawable. BUG: 18288235 Change-Id: I61a7b2c178253ed2d550fa0636e27e021ac9eb64
* | | | | Merge "Add offset method to Outline" into lmp-mr1-devChris Craik2014-11-132-2/+13
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add offset method to OutlineChris Craik2014-11-122-2/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | Also clean up offset docs in Path Change-Id: Ieca02611d32acce726efba652ae1969340a55a76
* | | | Merge "Add details and performance warnings to save flag docs" into lmp-mr1-devChris Craik2014-11-131-31/+88
|\ \ \ \ | |_|/ / |/| | |
| * | | Add details and performance warnings to save flag docsChris Craik2014-11-111-31/+88
| |/ / | | | | | | | | | | | | | | | bug:18239290 Change-Id: I5f73bf3f1bf01c8db6ab085b182b14348e47fb3e
* | | Merge "Don't propagate AnimatedStateListDrawable state change to super()" ↵Alan Viverette2014-11-122-11/+14
|\ \ \ | | | | | | | | | | | | into lmp-mr1-dev
| * | | Don't propagate AnimatedStateListDrawable state change to super()Alan Viverette2014-11-112-11/+14
| |/ / | | | | | | | | | | | | | | | | | | | | | Also updates child element inflation code in AnimationDrawable so that color resources can be used in the <item> drawable attribute. BUG: 18322272 Change-Id: I8d13643c5cbdb76d69634a7bac3cead9e9fba4e8
* | | Merge "Add a way to override Xfermode DO NOT MERGE" into lmp-mr1-devRob Tsuk2014-11-121-0/+9
|\ \ \ | | |/ | |/|
| * | Add a way to override Xfermode DO NOT MERGERob Tsuk2014-11-121-0/+9
| |/ | | | | | | | | | | | | Add a non-public API to Canvas/GLES20Canvas to provide a way to draw the touch ripple animation without using a save layer. Change-Id: I6e2095adffe515194f669fb75bb67abf813bd518
* | Merge "AVD: Requires all animator has stopped before start again." into ↵ztenghui2014-11-121-3/+6
|\ \ | | | | | | | | | lmp-mr1-dev
| * | AVD: Requires all animator has stopped before start again.ztenghui2014-11-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | We should treat all the animator as a group, we should not start again unless all the previous animations have stopped. b/18320770 Change-Id: I5b0c2c165cd314745ee6c7152aea3c666e9dff10
* | | Fix default attributes in ScaleDrawableAlan Viverette2014-11-121-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Reverts default scales to correct value of -1, uses existing state values when updating from typed array. BUG: 18351309 Change-Id: I45d21fe017a7bea10e3cbda50f6db65d053aa2ec
* | | Merge "Reduce number of saveLayer calls in RippleDrawable" into lmp-mr1-devAlan Viverette2014-11-123-175/+113
|\ \ \ | |_|/ |/| |
| * | Reduce number of saveLayer calls in RippleDrawableAlan Viverette2014-11-073-175/+113
| |/ | | | | | | | | | | | | | | | | | | | | Removes an extra saveLayer call by rendering ripples as overlapping. We are now down to zero saveLayers when drawing unmasked ripples or ripples masked against opaque content/masks, one saveLayer for ripples masked against content and two saveLayers when masked against an explicit mask layer. BUG: 18226391 Change-Id: I0fc09d21fbc462fbcfe4c26fc7b18737f584043e
* | Support theme attributes in StateListDrawable <item> elementAlan Viverette2014-11-062-80/+73
|/ | | | | | | | | | Also adds support for specifying drawable as a color since getDrawable() automatically wraps colors to ColorDrawable. Does not currently allow themed item elements to be used in Zygote preload, but we can add that at some point in the future. BUG: 18208662 Change-Id: I4c9721ffd100da4b9db7743a46c914828b943dae
* Default gradient radius to %p when no intrinsic width or height setAlan Viverette2014-11-031-4/+8
| | | | | BUG: 18224018 Change-Id: I05cbe3023d0a5e6813658063d3a3633c6ddd8d96