History log of /frameworks/base/graphics/java/android/graphics/Canvas.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d70695ee34611bee420d901ac9e6470d8c211519 05-May-2017 Derek Sollenberger <djsollen@google.com> Add an O-release targetAPI check for Canvas.setBitmap.

For apps targeting releases earlier than O setBitmap will attempt
to preserve the matrix from the previous bitmap. It does not however
attempt to reconstruct the save/restore stack or the clip.

Test: manual test of messenger app referenced in the bug
Bug: 37589964
Change-Id: I67f0928a3f84a8be41da38ef1868e79bdeb03e46
/frameworks/base/graphics/java/android/graphics/Canvas.java
eb69cbbe22d993a9ba88a1206853c660f8f43628 11-Apr-2017 Derek Sollenberger <djsollen@google.com> Change behavior of setBitmap to cleanly reset the canvas

- identity matrix
- no save stack
- wide-open clip

This reverts commit 4f641d1e4586b027969052cc0ad6b65c1158e72e

Test: bit CtsGraphicsTestCases:.CanvasTest
Bug: 36218535
Change-Id: Id11deb06e37d6df61f1f171d424ab150d812a7a8
/frameworks/base/graphics/java/android/graphics/Canvas.java
4f641d1e4586b027969052cc0ad6b65c1158e72e 14-Mar-2017 Tony Mantler <nicoya@google.com> Revert "Change behavior of setBitmap to cleanly reset the canvas - identity matrix - no save stack - wide-open clip"

https://buganizer.corp.google.com/issues/36218535

This reverts commit 269f989fbf198b17994baf9141c4640aeaf34b4e.

Change-Id: Ib2473e4fce90c9abaa39eea2b77082ae26197b80
/frameworks/base/graphics/java/android/graphics/Canvas.java
269f989fbf198b17994baf9141c4640aeaf34b4e 01-Mar-2017 Mike Reed <reed@google.com> Change behavior of setBitmap to cleanly reset the canvas
- identity matrix
- no save stack
- wide-open clip

Behavior around the new bitmap is the same.

Tests : CtsGraphicsTestCases

Change-Id: Ieaf8c2a1b96262ed33940dd852a86089eb93efdb
/frameworks/base/graphics/java/android/graphics/Canvas.java
7183b6908b0af807491e90f37e9e05794bd0c3f1 14-Feb-2017 Derek Sollenberger <djsollen@google.com> Merge "Deprecate Canvas save/saveLayer flags."
8c5759624c71ef701cba6751a030328481b4a83c 09-Feb-2017 Derek Sollenberger <djsollen@google.com> Deprecate Canvas clipping for arbitrary Region.Ops.

Operations that can expand the clip are difficult to support and
don't fit the parent child model that is used by the view system.

Test: compile
Bug: 14650725
Change-Id: I67e99d3e1a1eb0b231910ee5d277a38e8a953dc4
/frameworks/base/graphics/java/android/graphics/Canvas.java
b8201195dfb2bae05faaf91b9b3d065e2f199929 09-Jan-2017 Derek Sollenberger <djsollen@google.com> Deprecate Canvas save/saveLayer flags.

Test: compile
Bug: 14650725
Change-Id: I6424ac46bae0a7a87c4b7743e81319945dfdd087
/frameworks/base/graphics/java/android/graphics/Canvas.java
bfa0b29883d56edfc2ec217962290d3c94f9fc2a 20-Jan-2017 Chris Craik <ccraik@google.com> Use @CriticalNative in Canvas

Bug: 33460152
Test: ViewShowHidePerfTests

Switches non-drawing @FastNative methods to @CriticalNative, except
where out arguments prevent it.

Performance in ViewShowHidePerfTests not significantly impacted.

Change-Id: I3edc963accb4f87f73d175c7b2534868602a7db3
/frameworks/base/graphics/java/android/graphics/Canvas.java
b29b16e5423fe7deab8ebf3da512c6d2192f19b5 04-Jan-2017 Derek Sollenberger <djsollen@google.com> Remove clipRegion from the public API.

This API is difficult to support for printing and has other negative
effects as it does not respect the current matrix/clip.

Test: compile
Bug: 14650725
Change-Id: I71f9bd687d446c7ce8910d755421aad8e09458db
/frameworks/base/graphics/java/android/graphics/Canvas.java
1ece145e018a7e66d3f422e647d3f6cb1887dca5 20-Oct-2016 John Reck <jreck@google.com> Re-order draw methods to make update-api happy

update-api orders methods alhabetically by name, but when
there's multiple methods with the same name it falls back to
the ordering within the file.

Re-order the methods in canvas.java to match what's already in
current.txt to avoid unnecessary changes.

Also auto-formatted the draw methods as some were mis-indented.

Test: No behavior change, just method re-ordering
Change-Id: I2a7d313c8e7a6bd9187c4ed7dbde944b88aa32bb
/frameworks/base/graphics/java/android/graphics/Canvas.java
caa08ff5e9ee004634a95776fc72bb769f1286de 07-Oct-2016 John Reck <jreck@google.com> The bigger update to Canvas

All draw* calls in Canvas are regular JNI
All draw* calls in DisplayListCanvas are FastNative
Unifies Canvas JNI on nMethodName naming

CanvasPerf results before:
INSTRUMENTATION_STATUS: basicViewGroupDraw_min=12492
INSTRUMENTATION_STATUS: recordSimpleBitmapView_min=13912

and after:
INSTRUMENTATION_STATUS: basicViewGroupDraw_min=11945
INSTRUMENTATION_STATUS: recordSimpleBitmapView_min=13318

Test: refactor, makes & boots
Change-Id: I06000df1d125e17d60c6498865be7a7638a4a13e
/frameworks/base/graphics/java/android/graphics/Canvas.java
5cb74bca88268a8b9025be2cce81e1b4f967d19d 07-Oct-2016 John Reck <jreck@google.com> Canvas fastjni -> @FastNative

Just the basic cleanup first, will follow-up with a more
comprehensive update later
Test: builds & boots, refactor no behavior change

Change-Id: Ie3a7144b5fefdfda085e2ab50da8b0e627a1ecb8
/frameworks/base/graphics/java/android/graphics/Canvas.java
8b9ed44f8d559be2590b25cb4b72d2aefd3b3784 26-Aug-2016 Chet Haase <chet@google.com> Various doc cleanups

Issue #6439958 More R.attr breakage
Issue #918412 android.graphics.Paint.FontMetricsInt fields & methods need doc
Issue #917387 javadoc bug: Canvas.EdgeType has minimal documentation
Issue #18948460 [DAC-bug] LinearLayout xml layout_weight parameter is missing description

Change-Id: Idb289ca778b3f316923757405460031ce7a5e1e9
/frameworks/base/graphics/java/android/graphics/Canvas.java
f761b415010f360f65f05985356c0ea3a5661478 29-Jul-2016 Adrian Roos <roosa@google.com> Merge \\\"Keyguard: Reapply insets when fitsSystemWindow changes\\\" into nyc-mr1-dev am: 5e0a42848e am: 7c323ce7d7
am: 51fe9421ae

Change-Id: Ia96e1c2c59e83d8d8472a8795fd5998d9f7fe3a2
a6a8557d6e6c8ecc170767b7552979dbdb4254ef 27-Jul-2016 sergeyv <sergeyv@google.com> Turn off simplePath optimization then Path object is used as out param

Change-Id: I4d9ae5c756b2ed1ba30483e8685ce1ad6c1f0c03
fixes:30349106
/frameworks/base/graphics/java/android/graphics/Canvas.java
41f864ec45c4fc5c490936fd145c4b087c076646 13-May-2016 John Reck <jreck@google.com> Minor optimizations

Don't save matrix if we just need clip saved
Early-reject the easy-to-reject cases in Canvas
before hitting JNI

Change-Id: I385ef90a31efbda31ce37837152f626aad553ee7
/frameworks/base/graphics/java/android/graphics/Canvas.java
0ebdbb4a8470bb77f38c33a42c220ecb8a7adcc6 03-May-2016 Richard Uhler <ruhler@google.com> Hold a ClassLoader reference in NativeAllocationRegistry.

So that the native library isn't unloaded before we have a chance to
call the freeFunction.

Bug: 28406866
Change-Id: I889f1ccd91bba70e31fb8d09c0ec6d471fc35841
/frameworks/base/graphics/java/android/graphics/Canvas.java
3d8298e1a8b35dadb0a383aadb9a545ecab463e2 21-Apr-2016 sergeyv <sergeyv@google.com> DisplayListCanvas: throw exception at attempt to draw bitmap with size > 100MB

bug:26943116
Change-Id: If72c9f21ca2d8eb660ea2db4a42c8199f8d02472
/frameworks/base/graphics/java/android/graphics/Canvas.java
f6765f3965ce669458e0bb5d2e226d4233a1acb3 26-Feb-2016 Andreas Gampe <agampe@google.com> Frameworks/base: Refactor Paint & Canvas native allocation support

Put the native allocation support into a holder class. This allows
statically initializing the classes in the boot image.

Bug: 27265238
Bug: 23130675
Change-Id: I857aebfdbaec39067a5eb58afceb49630176af98
/frameworks/base/graphics/java/android/graphics/Canvas.java
775873a66a946fae2b0535abb51df9817bd1b20c 29-Dec-2015 Richard Uhler <ruhler@google.com> Use NativeAllocationRegistry for Paint, Canvas, and Bitmap

Bug: 23130675
Change-Id: I3fbd84ba417ac63df75f87ee2c56e3e7f3c9eb46
/frameworks/base/graphics/java/android/graphics/Canvas.java
7ee860c4164bb2b763376ff2c130a9be2766d26c 06-Jan-2016 Chris Craik <ccraik@google.com> Merge "Add missing @deprecated comments to canvas methods"
eda57925cafdf1dab451e70052dea27846f368b4 18-Dec-2015 Chris Craik <ccraik@google.com> Add missing @deprecated comments to canvas methods

bug:25311154

Change-Id: Ie89e2160969eb7b4187f28ab4b0342804cf67724
/frameworks/base/graphics/java/android/graphics/Canvas.java
92c11864c7b4901db90f88ec025d9a773454e7f6 18-Dec-2015 Chris Craik <ccraik@google.com> Correct drawLines annotations

Change-Id: I161e419a3ce427e10d802ba692679ad671e23dde
/frameworks/base/graphics/java/android/graphics/Canvas.java
0d3d1f825f399c62f2ba236b53bef17581e03a16 02-Dec-2015 Sungsoo Lim <sungsoo@google.com> Fixed typos: when when

Change-Id: I80c0b8817dcbed45071e42d9ffa88bae52a93a81
/frameworks/base/graphics/java/android/graphics/Canvas.java
4c5efe9290543b723b76a8bd48518da1ae1dcb26 10-Jul-2015 Derek Sollenberger <djsollen@google.com> Add ninePatch support to Canvas.h

Change-Id: Ic095291fe55911c6501c1bdefa4b8da973c77319
/frameworks/base/graphics/java/android/graphics/Canvas.java
773bbe0357b17a16d095ce57c30980992a9c977f 18-Aug-2015 John Reck <jreck@google.com> Revert "Add ninePatch support to Canvas.h"

This reverts commit edca320a2b42011f98c308fdf25fc0494c6a5454.

Change-Id: I30ee93cfc1cac391ce152f03e9e13a1ad24dc91b
/frameworks/base/graphics/java/android/graphics/Canvas.java
edca320a2b42011f98c308fdf25fc0494c6a5454 10-Jul-2015 Derek Sollenberger <djsollen@google.com> Add ninePatch support to Canvas.h

Change-Id: Ib3202fd7c5b9f35853f286abe84b3ed009df1a81
/frameworks/base/graphics/java/android/graphics/Canvas.java
6578a989566e585eee053095dc80e2552e125db2 13-Jul-2015 Derek Sollenberger <djsollen@google.com> Support High Contrast Text for all canvas types

Change-Id: Iee324446798fe1a1cb32cb991f181a4af24aa93c
/frameworks/base/graphics/java/android/graphics/Canvas.java
749e67438c7e2dbe2bb362dc07522a1702810455 29-Jul-2015 Chris Craik <ccraik@google.com> Revert "Support High Contrast Text for all canvas types"

bug:22820834

This reverts commit 876d56612ab8ec7032f702905d694670e6c4febd.

Change-Id: I4e07a0894095caaaf2fd36bfa6073d033542bfc4
/frameworks/base/graphics/java/android/graphics/Canvas.java
876d56612ab8ec7032f702905d694670e6c4febd 13-Jul-2015 Derek Sollenberger <djsollen@google.com> Support High Contrast Text for all canvas types

Change-Id: Ib46ba3d7c67e081872e6a4b11d294fe9a61f5bbd
/frameworks/base/graphics/java/android/graphics/Canvas.java
94394b3fb048d5349a77b57950ab7f6b6e92ce34 10-Jul-2015 Derek Sollenberger <djsollen@google.com> Move drawRegion from DisplayList to Canvas

Change-Id: I9f401dc5b24732938ac2ca7ed829796e2d7ef3e8
/frameworks/base/graphics/java/android/graphics/Canvas.java
cc882b6518129a11fa007f8c9343e972f03607b4 09-Jul-2015 Derek Sollenberger <djsollen@google.com> Remove unused functions and variables from DisplayListCanvas

This also moves some functions that are only called when creating/completing
a displayList into the appropriate constructors and endRecording calls.

Change-Id: I9f6add156d7f476a52766934af713b0f852c8dea
/frameworks/base/graphics/java/android/graphics/Canvas.java
f2122ef549dd73f68bdbe4d6767f6516935024d0 11-Jun-2015 Keisuke Kuroyanagi <ksk@google.com> Improve boundary check for for Paint#DrawTextRun.

Change-Id: I01027ebb9133240cc1c750824a41dd9fca484c1f
/frameworks/base/graphics/java/android/graphics/Canvas.java
7c103a36f60b690e3fe83c40210e1cb0c76bba43 16-Apr-2015 John Reck <jreck@google.com> Remove Bitmap#getSkBitmap

Change-Id: Ifb9047b426122d3e5a445eb7a0eb3fce38dedf27
/frameworks/base/graphics/java/android/graphics/Canvas.java
3731dc220ed457e0f1e99d7ec2589e0a43872b59 14-Apr-2015 John Reck <jreck@google.com> A bunch more cleanups

Switch a few places to using android::canvas
instead of SkCanvas as well which eliminated
some JNI

Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
/frameworks/base/graphics/java/android/graphics/Canvas.java
c6abf5bff6bbfafa1f133644f02a5d50d5269b7f 24-Apr-2015 Raph Levien <raph@google.com> Expose drawTextRun publicly

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
/frameworks/base/graphics/java/android/graphics/Canvas.java
c1b33d665c8caf5760f68c45c6ca0baa649b832a 22-Apr-2015 John Reck <jreck@google.com> GraphicsJNI Canvas cleanup

Change-Id: I72e142986a8bc9f464c1951b6b5187919de3462e
/frameworks/base/graphics/java/android/graphics/Canvas.java
9d4efdf2802f06ccf7031610891f75af70ea5538 17-Apr-2015 John Reck <jreck@google.com> Revert "A bunch more cleanups"

This reverts commit c294d128d03bc9a9982b273a82516c04583438cc.

Change-Id: Id1ebb236950f7c36c6d86e1dd95566d3a200748d
/frameworks/base/graphics/java/android/graphics/Canvas.java
1ff961dd6d51247e82e41de052f04fd0b577f09b 17-Apr-2015 John Reck <jreck@google.com> Revert "Remove Bitmap#getSkBitmap"

This reverts commit 4bd981ec533a65e8dee053a0a709b484770b0a76.

Change-Id: I5c92cd955c6e70e197dc5cbc5dfeed8369a24a31
/frameworks/base/graphics/java/android/graphics/Canvas.java
4bd981ec533a65e8dee053a0a709b484770b0a76 16-Apr-2015 John Reck <jreck@google.com> Remove Bitmap#getSkBitmap

Change-Id: Ifb9047b426122d3e5a445eb7a0eb3fce38dedf27
/frameworks/base/graphics/java/android/graphics/Canvas.java
c294d128d03bc9a9982b273a82516c04583438cc 14-Apr-2015 John Reck <jreck@google.com> A bunch more cleanups

Switch a few places to using android::canvas
instead of SkCanvas as well which eliminated
some JNI

Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
/frameworks/base/graphics/java/android/graphics/Canvas.java
3891f3ad598561d5a82c07795e1fee7f1d3612d1 03-Apr-2015 Chris Craik <ccraik@google.com> Add compat path for restore underflow

bug:19829784

Change-Id: Ia761664208ab80c055ca11174db3ddc74457b92b
/frameworks/base/graphics/java/android/graphics/Canvas.java
b3ec733bb830f2d4425825d93f9ed95f284e9145 04-Mar-2015 Tor Norbye <tnorbye@google.com> Annotate methods with size and range annotations

Change-Id: I666861f0dfae31402b1280e9a966a583b88e2e1a
/frameworks/base/graphics/java/android/graphics/Canvas.java
80756e38882720860db52f1fcc21fa1505a02abf 02-Mar-2015 Tor Norbye <tnorbye@google.com> Annotate ARGB integer parameters with @ColorInt

Change-Id: I307f72a382272cf18ddb6b07d9fcb81228568d9a
/frameworks/base/graphics/java/android/graphics/Canvas.java
f4faeac3525fe1ce3707ab785a1651aec367589d 05-Mar-2015 John Reck <jreck@google.com> Cleanup Bitmap JNI attempt #2

Original version missed a spot

This reverts commit c02977e3bbfaaedcb1b1d67e1692becc7dddd59b.

Change-Id: I56244ce10d709fcdef42a001fe4c6ba7b6bbb04d
/frameworks/base/graphics/java/android/graphics/Canvas.java
c02977e3bbfaaedcb1b1d67e1692becc7dddd59b 05-Mar-2015 Chad Jones <chadj@google.com> Revert "Cleanup Bitmap JNI"

This reverts commit b2915245b74b3b5541b123e38403f8e26426b4b7.

Change-Id: Idd7d7f33eec4ea5024c83de6b10d3d1a6ab2b17a
/frameworks/base/graphics/java/android/graphics/Canvas.java
b2915245b74b3b5541b123e38403f8e26426b4b7 04-Mar-2015 John Reck <jreck@google.com> Cleanup Bitmap JNI

Fix a bunch of places where mNativeBitmap was being
poked at directly, switch them either to the NDK API
or to GraphicsJNI where it made sense

Change-Id: I6b3df3712d6497cba828c2d3012e725cb4ebb64d
/frameworks/base/graphics/java/android/graphics/Canvas.java
5dc973cb03889c58988703b58aefbd2397fb02c3 08-Jan-2015 Alan Viverette <alanv@google.com> Use text ascent / descent to center SimpleMonthView labels

Also updates Canvas.drawText() docs to clarify that the y-origin is
actually the baseline rather than the top (which is what developers
expect).

BUG: 18864682
Change-Id: Ibfa2a79327d17b5135f90468195fbeca922a25c8
/frameworks/base/graphics/java/android/graphics/Canvas.java
8dfaa4904205772cdceee63ef3989bcdedf1a914 09-Dec-2014 Tom Hudson <tomhudson@google.com> Make DisplayListRenderer inherit from Canvas, merge JNI

Incrementally unify the upper layers for Skia and HWUI.
Remove redundant code from GLES20Canvas.java; instead
use inherited mNativeCanvasWrapper and superclass method
definitions.

Moves some unrelated SkPaint utility functions from Renderer
to new utils/PaintUtils.

bug: 15672762
Change-Id: I4ddd4214b8e9eeb95289d054ef423f2542bb5fa5
/frameworks/base/graphics/java/android/graphics/Canvas.java
6bcf223bf64cd4895e3fe948080475075ff7b80d 21-Nov-2014 Chris Craik <ccraik@google.com> Merge "Revert "Add a way to override Xfermode""
da3198a550bdd91ccdc8a09c3a6e00d3b61c0c20 21-Nov-2014 Chris Craik <ccraik@google.com> Revert "Add a way to override Xfermode"

Feature no longer needed.

bug:18448377

This reverts commit c495e611b9fa1fc6b47a647c714bbbf94dd63461.

Change-Id: Ia3e37f06953ffd81ca3fac367ee790d26b1b5d29
/frameworks/base/graphics/java/android/graphics/Canvas.java
0a39f8ffe012e43f16836b057f3f0d1bc05158f3 14-Nov-2014 Raph Levien <raph@google.com> am 7010d0b6: am 505ffe36: Merge "Check bounds on CharSequence drawText methods" into lmp-mr1-dev automerge: 58fa003

* commit '7010d0b6c398cb03b4be43a547921c3e9a95eeb0':
Check bounds on CharSequence drawText methods
505ffe3633f45778e493e23ad8c163f09ed1dbb5 14-Nov-2014 Raph Levien <raph@google.com> Merge "Check bounds on CharSequence drawText methods" into lmp-mr1-dev
95e5a82e1d3743778218fb7b94389f8a5622809a 13-Nov-2014 Rob Tsuk <robtsuk@google.com> Merge "Add a way to override Xfermode"
e8a39f5960c752c7a427580a2a9067280bf38ca0 13-Nov-2014 Chris Craik <ccraik@google.com> am b71be9c3: am 9750c696: am 075b2b4f: Merge "Add details and performance warnings to save flag docs" into lmp-mr1-dev

* commit 'b71be9c3523adef99b42833e974b6f61369a24b0':
Add details and performance warnings to save flag docs
075b2b4ff9a9a96462a3102b54fdcabc6e5daf99 13-Nov-2014 Chris Craik <ccraik@google.com> Merge "Add details and performance warnings to save flag docs" into lmp-mr1-dev
c495e611b9fa1fc6b47a647c714bbbf94dd63461 12-Nov-2014 Rob Tsuk <robtsuk@google.com> Add a way to override Xfermode

Add a non-public API to Canvas/GLES20Canvas to provide a way to draw
the touch ripple animation without using a save layer.

Bug: 18226391
Change-Id: I6f8fb8938505e976892c4e14f6f864362c43e73c
/frameworks/base/graphics/java/android/graphics/Canvas.java
d82f8a9a3869448e6d7d4b3fc962e34e33a1ba0e 13-Nov-2014 Raph Levien <raph@google.com> Check bounds on CharSequence drawText methods

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
/frameworks/base/graphics/java/android/graphics/Canvas.java
4678dcc5524258908eadc5fe1e5e1874768967eb 12-Nov-2014 Rob Tsuk <robtsuk@google.com> Add a way to override Xfermode DO NOT MERGE

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
/frameworks/base/graphics/java/android/graphics/Canvas.java
f37a364a530c5c055cf4634f0b0463454a252b0f 11-Nov-2014 Chris Craik <ccraik@google.com> Add details and performance warnings to save flag docs

bug:18239290

Change-Id: I5f73bf3f1bf01c8db6ab085b182b14348e47fb3e
/frameworks/base/graphics/java/android/graphics/Canvas.java
dfba4d3d11bbf47dff45f94d61d4d97510b3034a 02-Sep-2014 Derek Sollenberger <djsollen@google.com> Mutable Java Shaders with Immutable Native Shaders

bug: 17641888
Change-Id: I0f05387423cde185dab1a1453f89d5251ca1a4f9
/frameworks/base/graphics/java/android/graphics/Canvas.java
9bc13a353fa8fac323839268789ef661b219530c 12-Sep-2014 Chris Craik <ccraik@google.com> Fix null rect parameter for saveLayer / saveLayerAlpha

bug:17476559
Change-Id: I3ba43c9eed8f6fc455eb41e0990e75e0f4c7b648
/frameworks/base/graphics/java/android/graphics/Canvas.java
96890564bdbd2f2a41dfc323fc8b3938fb335639 05-Sep-2014 Chris Craik <ccraik@google.com> Replace native crash with IAE when calling picture.draw() w/ a HW canvas

bug:17397958
Change-Id: I75f942db0e604f9fd6ab31e6c81f718c0f57b16a
/frameworks/base/graphics/java/android/graphics/Canvas.java
8afd0f245cc0c4a0366f39f41b5f78e47ee83be3 22-Aug-2014 Chris Craik <ccraik@google.com> Create z reordering boundaries around dispatchDraw

bug:16012254

This means rendernodes with a Z will no longer be drawn at the end of
their parent's DisplayList, but at the end of the associated reorder
region (DisplayListData::Chunk).

Change-Id: Ia033fee9d9a4db567b2a8d5e90fc57a4d0a64544
/frameworks/base/graphics/java/android/graphics/Canvas.java
a753f4c6cb8558795e673df1896532cd148781e2 24-Jul-2014 Chris Craik <ccraik@google.com> Move ClipBounds to native

bug:15698973

Also simplifies RenderNode LTRB properties

Change-Id: I09263a697b71d325a46b57cd5250a2b165f251c8
/frameworks/base/graphics/java/android/graphics/Canvas.java
8872b38ef403cc2c44aca07d392f5e9426fd7f54 23-Jun-2014 Derek Sollenberger <djsollen@google.com> Separate Canvas JNI code from the implementation.

This introduces Canvas.h which is a pure virtual interface that
is intended to be used by both Skia and HWUI implementation. To help
stage this transition this CL only introduces the interface and Skia
implementation. The interface is not intended to be final and will
undoubtedly go through iterations in both style and location as we
look to introduce the HWUI implementation.

BUG:15672762
Change-Id: Ibaccdddb87d3b9358f4f0c1d317ead5282d4ee16
/frameworks/base/graphics/java/android/graphics/Canvas.java
580ff8142b7d0455d0d41ee77572b4f55dd935f0 17-Jul-2014 John Reck <jreck@google.com> Revert "Separate Canvas JNI code from the implementation."

This reverts commit e28a5afee885cd69a5be5809f88116b601cb1a72.

Appears to cause memory corruption and random appearances of
chinese

Bug: 16343240
Bug: 16336642

Change-Id: Ife169181f40adff4b12948ed5f9d3a88dcec935b
/frameworks/base/graphics/java/android/graphics/Canvas.java
889fc94ffa70633e510e812b9da86723f4eee384 17-Jul-2014 Chris Craik <ccraik@google.com> Merge "Add accessibility text contrast setting" into lmp-dev
cce47eb580d666ead1f6095d1e3b65233592bbaa 17-Jul-2014 Chris Craik <ccraik@google.com> Add accessibility text contrast setting

b/14624452

Adds a feature which draws all text (in the HW accelerated standard
path) in a high contrast mode. Text is drawn at full alpha, and either
white or black (depending on its original color) with a starkly
contrasted outline beneath it.

Change-Id: I943f624b6367de35367cced3b2a8298f2bc62377
/frameworks/base/graphics/java/android/graphics/Canvas.java
f5d6c555c3430f6e423952ba3ab024380e550bba 23-Jun-2014 Derek Sollenberger <djsollen@google.com> Separate Canvas JNI code from the implementation. DO NOT MERGE

This introduces Canvas.h which is a pure virtual interface that
is intended to be used by both Skia and HWUI implementation. To help
stage this transition this CL only introduces the interface and Skia
implementation. The interface is not intended to be final and will
undoubtedly go through iterations in both style and location as we
look to introduce the HWUI implementation.

BUG:15672762
Change-Id: Idefadede356f688edb8eb09b4a02aa01b4077f62
/frameworks/base/graphics/java/android/graphics/Canvas.java
3f0d6167227d6d2cdd85f7718d92db859b443e92 18-Jun-2014 Raph Levien <raph@google.com> Simple implementation of drawPosText

The existing implementation of drawPosText is broken in various subtle
ways, in any case doesn't work with Minikin. This patch just implements
it by drawing a separate run for each Unicode character, which should
have the least surprising results for complex scripts such as Khmer.

Part of b/11750374 Resolve TODO items for Minikin

Change-Id: I874ae3c163f0cbe3cdf0160564fab04305aed5aa
/frameworks/base/graphics/java/android/graphics/Canvas.java
9d2b5e1930bfc4b1da1c865843c247c708ea1565 16-Jun-2014 Raph Levien <raph@google.com> Implement drawTextOnPath with Minikin

This patch contains an implementation of drawTextOnPath for both
software and hardware Canvas using Minikin for text layout. One of the
steps for switching all remaining text operations to Minikin so the old
TextLayout and Skia fallback fonts mechanisms can be deleted.

Bug: 11750374 Resolve TODO items for Minikin
Change-Id: I06bfe74a101fa1dcdfc38f530f7194d71e522a85
/frameworks/base/graphics/java/android/graphics/Canvas.java
24609581330bc350f797179e3c1a59789c645ec2 13-Jun-2014 Antonio Calabrese <acalabrese@google.com> Added primitive parameters to various functions requiring rectangles.

Change-Id: I5a2678fa989f0ff34404b8236787a8153b05f113

bug:14322352
/frameworks/base/graphics/java/android/graphics/Canvas.java
051910b9f998030dacb8a0722588cc715813fde1 16-Jun-2014 Raph Levien <raph@google.com> Clean up dirFlags / bidiFlags confusion

The dirFlags and bidiFlags enums are distinct, and have different
meanings. The former is a determined direction for a run of text, while
the latter is a request for the bidi algorithm. They have been used
interchangeably, and this has caused some problems, notably running the
bidi algorithm needlessly when the direction for a run is already
determined.

This patch cleans up the confusion, by always naming each occurrence
explicitly "boolean isRtl" or "int bidiFlags" (the previous code often
just used "int flags", which added to the confusion), and converts
between the meanings when a function takes an isRtl argument but passes
it to another function expecting bidiFlags.

Fixes b/15089607 Clean up bidi flag mess

Change-Id: I410b6604376e853dd12c255e7f5a9d2b9a310dd9
/frameworks/base/graphics/java/android/graphics/Canvas.java
ff7215aa0cb28a4815126b056f34b2bd29e5c651 06-Jun-2014 Antonio Calabrese <acalabrese@google.com> Annotated the drawing commands.

Change-Id: I4eeb35ecaf4aa16e0924b5215351fce79c68369b
/frameworks/base/graphics/java/android/graphics/Canvas.java
95d49149cc7fff87a18449fa661454c1b5ddbd30 03-Jun-2014 Florin Malita <fmalita@google.com> Canvas JNI cleanup.

As pointed out in a previous patch review, some native Canvas methods do not
receive a native canvas handle and instead have to use GraphicsJNI to query
the object mNativeCanvasWrapper field.

To avoid the extra JNI call, this change adds the missing Java wrapper
methods and ensures that all native calls are passed efficient native
handles.

Also, some native methods are consolidated: save, saveAll -> save,
clipRect* -> clipRect.

Change-Id: I2eae4a633f6a463d9fbae2ca632661acc8b5cfc3
/frameworks/base/graphics/java/android/graphics/Canvas.java
5c3d927e17e98e8fd4a9f3c86f7f4def0bcfa816 08-May-2014 Florin Malita <fmalita@google.com> Add a native Canvas wrapper.

Instead of storing a direct SkCanvas reference, Canvas now tracks
an opaque native wrapper class. The native wrapper can be used to
store additional info for emulating deprecated Skia features
(at this point it only stores a canvas).

Some notes:

* all native handle -> SkCanvas conversions are routed through a
handful of native utility methods.
* safeCanvasSwap() refactored as a lower level setNativeBitmp() - which
is what clients need.
* removed unused get_thread_msec() (Canvas.cpp)

Change-Id: I715a5a6f1e1621c1cfc1e510ae4f2ea15cf11114
/frameworks/base/graphics/java/android/graphics/Canvas.java
0d181540e0c96da454f45e65987f690b27b929d9 12-May-2014 Derek Sollenberger <djsollen@google.com> Cleanup Canvas API by deprecating a few methods.

The clipRegion(Region) API exposed a different semantic than all other clip APIs by not
respecting the current matrix. The same behavior can be achieved by calling clipRect(Rect)
on the Rects within a Region.

bug: 14650725
Change-Id: I7e91813b8e2474f327e070e549fa303d66f8b552
/frameworks/base/graphics/java/android/graphics/Canvas.java
797b95b26bbb7557678af78b9a2a61830158920f 21-May-2014 Chris Craik <ccraik@google.com> Define light position (using new lighting spec) in Java

Also updates the relative shadow strengths.

Change-Id: I6cac7275d38df98aea9f0dda463cd7207102986a
/frameworks/base/graphics/java/android/graphics/Canvas.java
c677675e9c465dc1de21ecf2e0421835c7eb55b4 07-May-2014 Florin Malita <fmalita@google.com> Encapsulate Canvas.mNativeCanvas

Currently, the native canvas is accessed/manipulated from several
unrelated classes.

In order to facilitate SaveFlags emulation, this CL encapsulates
the field and refactors its external users.

Two main changes:

* new getNativeCanvas() getter for use in Java-level clients.
* JNI canvas swappers (GraphicsBuffers, Surface, TextureView &
AssetAtlasService) are refactored based on the exising/equivalent
safeCanvasSwap() Canvas method.

Change-Id: I966bd4898f0838fb3699e226d3d3d51e0224ea97
/frameworks/base/graphics/java/android/graphics/Canvas.java
4d1c1538e2422d0a5b19ad1cd2fb353ed6279a88 24-Apr-2014 Chris Craik <ccraik@google.com> Add floats-only drawRoundRect to Canvas

Change-Id: Ib0033a2d2486a808a44984ec4adf7fef76d9ea17
/frameworks/base/graphics/java/android/graphics/Canvas.java
c306ad61a791bae34ed83b339f27cb67a1d91b53 17-Apr-2014 Chris Craik <ccraik@google.com> Add convenience methods to encourage usage of ALL_SAVE_FLAG

Change-Id: I7a3bb2b83ca0463282764898e755b5f1a71ac557
/frameworks/base/graphics/java/android/graphics/Canvas.java
ddd4a9b9c329274d56a72d84f11dc0148215c406 17-Apr-2014 Chris Craik <ccraik@google.com> Merge "Revert "Add convenience methods, to encourage usage of ALL_SAVE_FLAG""
091ddb1374e3bcdac129c1df5ef2555cf5c2183e 17-Apr-2014 Chris Craik <ccraik@google.com> Revert "Add convenience methods, to encourage usage of ALL_SAVE_FLAG"

This reverts commit 39b7353acacf08a3c0204a9ec122fff420e53310.

Change-Id: I732eab8a2843dd23c86bd1526ec95db5352d39a0
/frameworks/base/graphics/java/android/graphics/Canvas.java
0932cf87c131f9238538fd7137b282adbe71dc37 17-Apr-2014 Chris Craik <ccraik@google.com> Merge "Deprecate color array drawBitmap methods"
cd23df6a08cf7a9bdee11e703f40bca5904d779d 17-Apr-2014 Chris Craik <ccraik@google.com> Deprecate color array drawBitmap methods

Change-Id: I3339214ddaa7a32e9ddbbb1a074fa98e393eaadf
/frameworks/base/graphics/java/android/graphics/Canvas.java
39b7353acacf08a3c0204a9ec122fff420e53310 17-Apr-2014 Chris Craik <ccraik@google.com> Add convenience methods, to encourage usage of ALL_SAVE_FLAG

Change-Id: I29aefd70071ff49a259db5c06dded3cd531f6ef1
/frameworks/base/graphics/java/android/graphics/Canvas.java
36bef0bf30d6bae48cf3837df351075ca4fce654 20-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Make graphics classes 64-bit compatible

This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
be 64-bit.

[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
yet. Specifically mAtlasMap member has to be converted
to hold native pointer using long. Added a TODO to
AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Id5793fa0ebc17ee8b1eecf4b3f327977fdccff71
/frameworks/base/graphics/java/android/graphics/Canvas.java
7023df08f14ec5dee76ac54c03e870f84e297636 27-Jan-2014 Narayan Kamath <narayan@google.com> Revert "AArch64: Make graphics classes 64-bit compatible"

This reverts commit 18b4cbeedef21c1fa666a110a157bab66edff976.

Change-Id: I0c52983a3ab1ace3ff743de546a43eca28e5cb0e
/frameworks/base/graphics/java/android/graphics/Canvas.java
18b4cbeedef21c1fa666a110a157bab66edff976 20-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Make graphics classes 64-bit compatible

This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
be 64-bit.

[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
yet. Specifically mAtlasMap member has to be converted
to hold native pointer using long. Added a TODO to
AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Ib3eab85ed97ea3e3c227617c20f8d213f17d4ba0
/frameworks/base/graphics/java/android/graphics/Canvas.java
a033630e805c407080221e20b236b6054f324670 23-May-2013 Raph Levien <raph@google.com> Initial integration of Minikin to framework

With this patch, framework does at least some of its text rendering
using Minikin instead of TextLayoutCache. There's a lot of stuff broken
and not yet implemented, but the phone will boot.

Changes are hidden behind USE_MINIKIN, which should be set in
BoardConfig.mk for the brave. Without that, there are changes to
signatures in JNI methods and so on, but shouldn't be any visible
changes.

This commit also introduces a new abstraction for Typeface:

The new TypefaceImpl abstraction represents the functionality that
corresponds to a Java Typeface object. Currently it is backed by
SkTypeface, but in the migration to Minikin it is a FontCollection
combined with a FontStyle. This patch introduces a USE_MINIKIN
preprocessor switch, so there is no substantial change to existing
Skia-based code, but which lets us start replacing the implementation
with the Minikin version.

Change-Id: I532c4c2d32d4f4c1f349dc1db37caa112af587ea
/frameworks/base/graphics/java/android/graphics/Canvas.java
1abf5d62429e5a9329520b2f7c2b5a5e7a8e72ec 16-Aug-2013 Chris Craik <ccraik@google.com> Add inPremutiplied option to BitmapFactory.Options, functionality in Bitmap

bug:2248948

Change-Id: I8fdd649332667598504a1076d5a447572bd53086
/frameworks/base/graphics/java/android/graphics/Canvas.java
003123004f7b23b3dc472d5c40b8c1a16df37a54 09-Aug-2013 Romain Guy <romainguy@google.com> Remove an unnecessary allocation

Also remove dead code from OpenGLRenderer.cpp

Change-Id: I7eb54ca19e77ee3c32f1fe9513a031e6b2e115cf
(cherry picked from commit 5c7d5ab878b26f855175a3305a14ac12fcacf25e)
/frameworks/base/graphics/java/android/graphics/Canvas.java
667fe1039feae068d3333de8fb7115313f4a517b 03-Aug-2013 Jonathan Dixon <joth@google.com> Refactor Canvas.drawPicture() to delegate to Picture

Bug: 9814370

To allow WebView.capturePicture() to return a subclass, we need to
ensure the subclass is always consulted when being drawn into a canvas.

Change-Id: Ia0357f95b6fafb3ac81e6bcfaef05739e619897a
/frameworks/base/graphics/java/android/graphics/Canvas.java
4e7b772b733593fbe25c733e95b8dcea293234b6 16-Jul-2013 Romain Guy <romainguy@google.com> Fix crashes in setMatrix() and concat()

setMatrix() was crashing in native code, only with hw acceleration on.
concat() would throw a NullPointerException. It now ignores null matrices.

Change-Id: Iebd8b410a957d2ba501570c6fbb3f680ff4a1a23
/frameworks/base/graphics/java/android/graphics/Canvas.java
f296dca95f09be9832b5dcc79717986525d2b6cb 24-Jun-2013 Romain Guy <romainguy@google.com> (Small) 9patch drawing improvements

Save a bit of memory in meshs generated from native code
Avoid an extra if/else when drawing with hardware accelration on

Change-Id: I31a4550bde4d2c27961710ebcc92b66cd71153cc
/frameworks/base/graphics/java/android/graphics/Canvas.java
ff4adde5737be08d3e2d03fbe588c591d27d4a74 10-Jun-2013 Svetoslav Ganov <svetoslavganov@google.com> Generate PDF from Canvas.

This change adds simple APIs that enable an Android application
to generate a PDF document by drawing content on a canvas.

Change-Id: Ibac93d7c37b01a376ce7c48238657d8c7698d588
/frameworks/base/graphics/java/android/graphics/Canvas.java
7a56be0915b4ff7cecfbc88fc0a7d567dc58ee58 13-Jun-2013 Svetoslav Ganov <svetoslavganov@google.com> Revert "Generate PDF from Canvas."

This reverts commit 923c633ccfda45312fec5a3484b6cc1308cc71ab

Change-Id: Ie49f593ec702c1ecf96a5cc1fafa680c1db08747
/frameworks/base/graphics/java/android/graphics/Canvas.java
923c633ccfda45312fec5a3484b6cc1308cc71ab 10-Jun-2013 Svetoslav Ganov <svetoslavganov@google.com> Generate PDF from Canvas.

This change adds simple APIs that enable an Android application
to generate a PDF document by drawing content on a canvas.

Change-Id: Iddcd126b3af37c73d99262f6b276caa07b998c1d
/frameworks/base/graphics/java/android/graphics/Canvas.java
f3187b7df158d2de36955ddcc666ba4b8544a2ce 07-Jun-2013 Romain Guy <romainguy@google.com> Remove unnecessary Rect, better reuse of NinePatch objects

Cloning drawables (which happens a lot) was creating copies of NinePatch
objects, which would cause the hardware renderer to generate more meshes
than necessary. Also avoid keeping a String we don't need (it was interned
but still.) Last but not least, remove 1 RectF per NinePatch in the system.

Change-Id: If4dbfa0c30892c9b00d68875e334fd5c2bde8b94
/frameworks/base/graphics/java/android/graphics/Canvas.java
0c8c0add4e552fe910d787c2aa9253749b1c7b48 09-May-2013 Derek Sollenberger <djsollen@google.com> am c195ef73: am bee78812: Merge "Fix bug where we incorrectly clipped the bounds to the device size." into jb-mr2-dev

* commit 'c195ef73445c3ba605355798b9f1f9a78bc52f11':
Fix bug where we incorrectly clipped the bounds to the device size.
708144e828b1a549567ce50cd8ed3cda62930501 09-May-2013 Derek Sollenberger <djsollen@google.com> Fix bug where we incorrectly clipped the bounds to the device size.

This CL also updates the documenation to make it clear that the API
returns in local space, not clipped to the size of the bitmap/device.

bug: 8747526
Change-Id: I389844672ce955341863f9940c3b401ab00dc1dc
/frameworks/base/graphics/java/android/graphics/Canvas.java
07da9df62bdd22acda0a49d239443f0b07d994f7 09-May-2013 Derek Sollenberger <djsollen@google.com> am e3326143: am 2c76016c: Merge "Fix error where clips/matrices are incorrectly transferred." into jb-mr2-dev

* commit 'e3326143c63e791863c1fd95599fb9db74fb4eed':
Fix error where clips/matrices are incorrectly transferred.
3bd9a6dc6b30ed0ce40ca9087ca0f4b1ca789100 08-May-2013 Derek Sollenberger <djsollen@google.com> Fix error where clips/matrices are incorrectly transferred.

In these cases the caller passes in a NULL bitmap and expects it
to clear the canvas state. This change preserves that behavior.

bug: 8738494
Change-Id: I7ebf6a74bab3c2822849a3404de3828fec8d3084
/frameworks/base/graphics/java/android/graphics/Canvas.java
3b748a44c6bd2ea05fe16839caf73dbe50bd7ae9 18-Apr-2013 Romain Guy <romainguy@google.com> Pack preloaded framework assets in a texture atlas

When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
/frameworks/base/graphics/java/android/graphics/Canvas.java
e8918c57bde0152a109ac05386b21c8127523018 15-Mar-2013 Chet Haase <chet@google.com> Merge "Fix errors in Canvas.EdgeType docs" into jb-mr2-dev
d320001807168f5565bab9807ef13c111096bbb3 15-Mar-2013 Chet Haase <chet@google.com> Fix errors in Canvas.EdgeType docs

Issue #7722363 Fix Canvas EdgeType docs

Change-Id: I2908ff22879eb5996da73a37dae1a4cabf82fffb
/frameworks/base/graphics/java/android/graphics/Canvas.java
da12f389eb4be0c08ca3fa9ca7663f4977858df5 15-Mar-2013 Fabrice Di Meglio <fdimeglio@google.com> Revert "Clean Paint.mBidiFlags as it is no longer used"

This reverts commit 6d9fe5bd22b531bfce69b146254a4791c76acddc.
/frameworks/base/graphics/java/android/graphics/Canvas.java
3e7dbf5373732459b74fd698a6912d6115ed2870 04-Mar-2013 Chris Craik <ccraik@google.com> Merge "Document that degenerate lines wont be drawn" into jb-mr2-dev
a5ef27da958acb84014b9f6ca4622c02be02fe22 04-Mar-2013 Chris Craik <ccraik@google.com> Document that degenerate lines wont be drawn

bug:7658830

Skia and the HW acceleration path don't render anything for degenerate
lines.

Change-Id: I5ea6fe8f16533e5045a7cd10475f4240f6c311b6
/frameworks/base/graphics/java/android/graphics/Canvas.java
cdac497289fd2c39a352f6167dae3f77cc608cb8 22-Feb-2013 Derek Sollenberger <djsollen@google.com> Deprecate read/write Pictures to streams.

bug: 8241089
Change-Id: I435a534f5110cb2b8aba87c047b509020a22fd67
/frameworks/base/graphics/java/android/graphics/Canvas.java
1b63e60abd3082f539b4e1f4562eec2005383ba5 21-Feb-2013 Derek Sollenberger <djsollen@google.com> Fix use case where the Java Canvas is reused.

When provided with a new bitmap device the canvas will retain
certain information such as it's matrix and clip.

bug: 8167188
Change-Id: I20ac8a24eebc85fb7c147504a103ce9a95b530b3
/frameworks/base/graphics/java/android/graphics/Canvas.java
c4ca87f0f4034d4b987084d2b62ed7e5e0430557 20-Feb-2013 Chris Craik <ccraik@google.com> am 8a47d8ea: Merge "Clean up clipping and deferral logic"

* commit '8a47d8eaec26d0937aee94a057f561f246748339':
Clean up clipping and deferral logic
5d11676414b3606792e23c269cf75b44faa1a2af 20-Feb-2013 Chris Craik <ccraik@google.com> Clean up clipping and deferral logic

bug:8037003

-Merges replay methods
-Bounds checking for DrawBitmapMesh, DrawRects and DrawDisplayList
-Use clip as bounds for otherwise unbounded draw operations

Clip-as-bounds is correct for drawColor and functor, but other draw
operations (pos text, text on path, and layers) still need true bounds
calculation

Change-Id: I5d5149d2c624f01e3fe46628bf156e835e69b9d5
/frameworks/base/graphics/java/android/graphics/Canvas.java
c932760f667cf56ca7a1aeffde505745dc3632e1 14-Feb-2013 Chris Craik <ccraik@google.com> Merge "Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE"
7c1a49f5f5ed6613d736464bf5001b777e89ced2 13-Feb-2013 Chris Craik <ccraik@google.com> Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE

This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.

Conflicts:
packages/SystemUI/res/values-sv/strings.xml

Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
/frameworks/base/graphics/java/android/graphics/Canvas.java
6d9fe5bd22b531bfce69b146254a4791c76acddc 12-Feb-2013 Fabrice Di Meglio <fdimeglio@google.com> Clean Paint.mBidiFlags as it is no longer used

See bug #7623824

Change-Id: Ie2f9422821f6dcc73c99e8695f448e966b587b1d
/frameworks/base/graphics/java/android/graphics/Canvas.java
fc615a0f643408956fc0dc1b997871e2b27cee7e 20-Dec-2012 Derek Sollenberger <djsollen@google.com> Remove calls to SkCanvas::setBitmapDevice()

Change-Id: Ib0aa2f65b77802b105c0e8a9d7cdde2e863d3673
/frameworks/base/graphics/java/android/graphics/Canvas.java
ca79cf69d09efa0c327e9b1237d86a119aea5da7 14-Aug-2012 Derek Sollenberger <djsollen@google.com> Update framework to support r5967 of Skia.

bug: 6906025
Change-Id: Iefdb830ec3aa2ab3472c1c142484a7aa21788a15
/frameworks/base/graphics/java/android/graphics/Canvas.java
30ca5cd11a23f06f2f8eeaa587685450826f800f 08-May-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6408393 Character corruption is caused when locale is changed

- free the TextLayoutCache on Locale change

- also free TextLayoutCache when memory is low

Change-Id: I39a37ac8ec3c292cfb1c0eea4bb41ff71897d089
/frameworks/base/graphics/java/android/graphics/Canvas.java
e0aa84b7dc087e999e20055dcc04cb6a48d5bd62 04-Apr-2012 Romain Guy <romainguy@google.com> Optimize FBOs composition

Change-Id: Ifc8eada8922509373c0e4c3b2ed75b6f08d098de
/frameworks/base/graphics/java/android/graphics/Canvas.java
65447287cb4112cf74483c87be70bcd00b622e2d 20-Jan-2012 Romain Guy <romainguy@google.com> Fix build

Change-Id: I0e0f6a613cdad3ec075da9b84e3532dd492f0162
/frameworks/base/graphics/java/android/graphics/Canvas.java
f9d9c065ed75f1196316a9a31f92309f602cef76 20-Jan-2012 Romain Guy <romainguy@google.com> Deprecate unused APIs

Change-Id: I0107e246b632dda96b8b025217936954f1f46283
/frameworks/base/graphics/java/android/graphics/Canvas.java
62b6eaa7f3a8111311a7ee097f278eb55865a499 17-Jan-2012 Romain Guy <romainguy@google.com> Fix text encoding when drawing with drawPosText in software

Change-Id: I0cd8ee526189c38c50953a1a08b50e0b31c55d8c
/frameworks/base/graphics/java/android/graphics/Canvas.java
61fd1e8d8c3ccf2d6b7d4af1c19e8f0988d5a1ec 26-Oct-2011 Joe Fernandez <joefernandez@google.com> docs: add developer guide cross references, Project ACRE, round 3

Change-Id: I6125315ecdf0f78dd947c514a9944729d723e95d
/frameworks/base/graphics/java/android/graphics/Canvas.java
9d865512f1a39bac6bed612b24023213d5a1fb1d 12-Aug-2011 Romain Guy <romainguy@google.com> Remove unnecessary private API

Change-Id: I2ecb367528ec0691c07153a3d163b82a6ca33fdf
/frameworks/base/graphics/java/android/graphics/Canvas.java
0965a3244b4c3009d08db2e084cdcb681ef66d26 02-Aug-2011 Romain Guy <romainguy@google.com> Allow Canvas.setBitmap() to receive a null Bitmap.

Change-Id: I6096f0b44866e532ccd96a29c816bf34d48c1dc2
/frameworks/base/graphics/java/android/graphics/Canvas.java
796cc96243a57cd1b652bd90c4e7ba7823c6c2fe 16-Jul-2011 Fabrice Di Meglio <fdimeglio@google.com> Clean test APIs for Harfbuzz support

- also update unit tests

Change-Id: I557f61e84c4c4b6165163b783d9c679a6b3b4106
/frameworks/base/graphics/java/android/graphics/Canvas.java
f61970fc79e9c5cf340fa942597628242361864a 07-Jul-2011 Romain Guy <romainguy@google.com> Add an API to query maximum bitmap/texture size on Canvas.

Change-Id: I2c576c9a4ecad9f33cc6636bcbc29786acdf052d
/frameworks/base/graphics/java/android/graphics/Canvas.java
fcf2be1846935e7983ea2fe87fdd4d7af27764b6 06-Apr-2011 Fabrice Di Meglio <fdimeglio@google.com> TextLayoutCache - add glyphs caching

- cache glyphs after Harfbuzz shaping
- use "m" prefix for member variables
- add temporary API for drawing text with glyphs
- update BiDiTest app

Change-Id: I619b3f313b15f010018daad21b3e5e486619b4e4
/frameworks/base/graphics/java/android/graphics/Canvas.java
9f82b580d744ce4baf057b061994394dcf239eed 08-Mar-2011 Fabrice Di Meglio <fdimeglio@google.com> Use Harfbuzz instead of ICU4C for computing advances

- use Harfbuzz shaper for shaping and getting glyphs
- add test app for showing result of drawText() and drawGlyphs()
- add private API in Canvas and Paint for test app

Change-Id: Ia15be216f8636d2d864066e9b7de2f53008c30f6
/frameworks/base/graphics/java/android/graphics/Canvas.java
4a317db43d2bbc992284dd1f651751f13734d017 24-Feb-2011 Romain Guy <romainguy@google.com> More documentation for Canvas.drawArc()

Change-Id: I007a1db94306e05cf4e245f876aa1921f518c113
/frameworks/base/graphics/java/android/graphics/Canvas.java
2fc941e4650d618ff6e122f28b616d9032ffa134 04-Feb-2011 Romain Guy <romainguy@google.com> Fixes cache misses and extra allocations.
Bug #3421454

Change-Id: If4d5c960a7e4c581a9d213073e658284b4e1c497
/frameworks/base/graphics/java/android/graphics/Canvas.java
2b1847ea60650a9f68372abe860415f18b55081d 26-Jan-2011 Romain Guy <romainguy@google.com> Remove unused API

Change-Id: I1714fd82a64b752f0350ef4ef9179ce19e089c6a
/frameworks/base/graphics/java/android/graphics/Canvas.java
a566b7c3aada08d37cf08096c972e3e641bed773 24-Jan-2011 Romain Guy <romainguy@google.com> Fix bitmap meshes to work in display lists.

Change-Id: Ie226d049840942d9ad9cf58e0c19132f49d62a75
/frameworks/base/graphics/java/android/graphics/Canvas.java
5a7b466a2b4b7ced739bd5c31e022de61650545a 21-Jan-2011 Romain Guy <romainguy@google.com> Add support for drawBitmapMesh().

Change-Id: Ic77f9c534bb90dc7b9458299544bd50b8b6ae6a5
/frameworks/base/graphics/java/android/graphics/Canvas.java
3b703f2d11f20efaa953ad31d6c97fe3561efb03 11-Jan-2011 Romain Guy <romainguy@google.com> Hide Canvas.getGL()

Change-Id: I6d81cf9f43ce0c990fe30b3b3159c95ac738ae79
/frameworks/base/graphics/java/android/graphics/Canvas.java
e4ac2d6b5723c95e648c489b187ddde449452c13 01-Dec-2010 Patrick Dubroy <dubroy@google.com> Allocate bitmap backing buffers in the Java heap.

Change-Id: I60f6ccff13357c1c518e9d56b02fe0171637edd1
/frameworks/base/graphics/java/android/graphics/Canvas.java
41030da16856c8869e1e51d4a0405432fa96614e 13-Oct-2010 Romain Guy <romainguy@google.com> Add a getNativeMatrix() API.

This API can be used by WebView to apply the appropriate transform
on its rendering.

Change-Id: I79aa39a29805f462fb08226370328815e74bdc52
/frameworks/base/graphics/java/android/graphics/Canvas.java
2b282d312dfc359258934cb60e2c6bc833bb19a7 04-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> am 3d019a37: am 83d52229: Doc fix: duplicate word \'of\'

Merge commit '3d019a374fa41a11fb7b718770076e61235d1c45'

* commit '3d019a374fa41a11fb7b718770076e61235d1c45':
Doc fix: duplicate word 'of'
3d019a374fa41a11fb7b718770076e61235d1c45 04-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> am 83d52229: Doc fix: duplicate word \'of\'

Merge commit '83d522290e56f614d0d9373d47c2b54b9e207795' into gingerbread-plus-aosp

* commit '83d522290e56f614d0d9373d47c2b54b9e207795':
Doc fix: duplicate word 'of'
83d522290e56f614d0d9373d47c2b54b9e207795 04-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> Doc fix: duplicate word 'of'

Change-Id: I45a4ca443becc2f2cf02cbca2bd61ef2ee590b5c
/frameworks/base/graphics/java/android/graphics/Canvas.java
da8532c6f48b4c10b5e2ccb9e08690341efa1616 31-Aug-2010 Romain Guy <romainguy@google.com> Add hooks for hardware accelerated WebView.

Change-Id: I907cdec8a67594f87749ac46bda85f04af5a2003
/frameworks/base/graphics/java/android/graphics/Canvas.java
163935113919a184122b8b3bd672ef08c8df65dc 08-Aug-2010 Romain Guy <romainguy@android.com> Make libhwui entirely optional.

The makefile variable USE_OPENGL_RENDERER must be set to true to compile
libhwui and the related code in the JNI layer.

This change also removes obsolete APIs from Canvas that must not be used
and would be confusing if left in. These APIs were remnants of our first
attempt at an OpenGL renderer for the view hierarchy and had not been
taken out before Android 1.0 was released.

Change-Id: I2475ff1307212bab26c926724f3c508681c7dae1
/frameworks/base/graphics/java/android/graphics/Canvas.java
cc3ec6cdb2b892eb29513e72d8b205acbe997b25 23-Jun-2010 Gilles Debunne <debunne@google.com> New cursor controller in TextViews.

Editable TextView now display a cursor controller under the insertion
point so that it can be precisely moved.

Change-Id: Ia2e6ddc57d249647ff6683e10e4226db3df27223
/frameworks/base/graphics/java/android/graphics/Canvas.java
deba785f122a47915756ffd991f5540d952cf937 08-Jul-2010 Romain Guy <romainguy@google.com> Add support to draw 9patches in OpenGL.

This change only adds the necessary API and stubs. The implementation
will be added in another change.

Change-Id: Ie50b8aff5868e78796cee331df15bdbf990d2ea1
/frameworks/base/graphics/java/android/graphics/Canvas.java
4beb8ff7175ebd14b96942724a658f407d0b9951 09-Jun-2010 Doug Felt <dougfelt@google.com> Support bidi layout for drawTextOnPath.

Change-Id: Ie5867fdb66fe15336774e20d65fa63e0d05bf6fe
/frameworks/base/graphics/java/android/graphics/Canvas.java
ce0537b80087a6225273040a987414b1dd081aa0 30-Jun-2010 Romain Guy <romainguy@google.com> Add hooks for drawBitmap().

Change-Id: I58e962c3a8b2bc75c2605fe369ad3002579d86e0

Add texture cache.

Change-Id: I1c0e5581d228869e114438258a1014e33e024ad7
/frameworks/base/graphics/java/android/graphics/Canvas.java
c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6c 25-Jun-2010 Romain Guy <romainguy@android.com> Implement quickReject() and drawRect().

The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's
something on screen now.

Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
/frameworks/base/graphics/java/android/graphics/Canvas.java
0c702b88c5d0d4380930b920f5be6e66dd95a0d8 14-May-2010 Doug Felt <dougfelt@google.com> Move shaping to native.

Add internal API (getTextRunAdvances) to Paint, use when measuring.
Add internal API (getTextRunCursor) to Paint, use when determining
valid cursor positions.

Remove java-level shaping code. Remove 'prep' code in TextLine
(except for replacement text) since shaping now is done on the fly as
needed in native.

Provide explicit shaping context bounds to internal text measuring,
cursor movement, and rendering APIs.

Update for to changes in external API in ushape.h.

Change-Id: I146958b624802ce8553125e5c3c6c03031bc9608
/frameworks/base/graphics/java/android/graphics/Canvas.java
2d6145993e19d2bb664766dbaf3c1e9ad3d12cdc 10-Jun-2010 Romain Guy <romainguy@google.com> Move OpenGL support out of ViewRoot into a new HardwareRenderer class.

Change-Id: Iffaed924a5defc3c4df26223c390dc27eee115b1
/frameworks/base/graphics/java/android/graphics/Canvas.java
d994dcbd816d5431dfaa59de7457e28bdfc8f523 08-Jun-2010 The Android Open Source Project <initial-contribution@android.com> am cefdedc3: merge from froyo-plus-aosp
92ce5734b52ef014c80cc6335112a027188b3eb6 02-Jun-2010 Erik Faye-Lund <kusmabite@googlemail.com> Canvas.drawVertices: correct color range-check

The range-check in drawVertices previously checked that the color
count was equal to the vertex count. However, the vertex count is
specified in array elements, and there's two array elements per
vertex for the positions, but only one array element per vertex
for the colors.

Correct the code so the check is consistent with the element count.

Change-Id: Id043f1003f9245f18adc91bac49dc33727ca765e
/frameworks/base/graphics/java/android/graphics/Canvas.java
f47d7405bbcb25d7cdf89ebb059f41520fe9ab87 22-Apr-2010 Doug Felt <dougfelt@google.com> Modify Canvas drawText to run bidi and shape.

Adds drawTextRun as internal API on Canvas and GraphicsOperations.
Adds implementation to implementors of GraphicsOperations.

Adds state and API on Paint to control the bidi algorithm when used
by Canvas. This API is currently hidden.

The drawText changes are incomplete since shaping is not yet available
in the native code.

Change-Id: I4368048aef9545df0953a349381771603e04b619
/frameworks/base/graphics/java/android/graphics/Canvas.java
0d221012ff5fd314711c00ed30e9b807b9c454c1 30-Jul-2009 Dianne Hackborn <hackbod@google.com> Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA

It turns out we were not returning the density for anything retrieved from a
TypedArray... which basically means any bitmap references from a layout or style...!!!

This is now fixed.

Also fiddle with the density compatibility mode to turn on smoothing in certain situations,
helping the look of things when they need to scale and we couldn't do the scaling at
load time.
/frameworks/base/graphics/java/android/graphics/Canvas.java
96e240f25a97c10bba863df328ed73a82c34ff61 27-Jul-2009 Dianne Hackborn <hackbod@google.com> Fiddle with default densities to try to sanitize the API.

An issue with the density API is that bitmaps assumed the old default density,
so new programs would have to explicitly set the correct density for every bitmap
they create.

This is an attempt to fix that situation, by define the default density of bitmaps
to be the main screen's density, except for old apps where it is the original default
density.

Actually implementing this is not so great, though, because the Bitmap constructors
can't really know anything about who is calling them to know which density to use.
So at this level the compatibility mode is defined per-process -- meaning the initial
package loaded into a process defines the default bitmap density, and everyone else
loaded in later on has to live with that.

In practice this shouldn't be much of a problem, there shouldn't be much mixing of
old vs. new apps in a process. It does mean that, going forward, if a developer is
going to use shared user IDs for this, they will need to make sure either that all of
their apps are in the same compatibility mode, or that their code explicitly sets the
density of bitmaps it receives. This isn't all that great, but I think it is worth
the benefit of allowing people who write modern apps to not have to deal with bitmap
densities.

This change also does some cleanup of the density management (making sure to always
copy over bitmap densities, etc) and adds java docs to explain the various ways
density is set and used by the system.
/frameworks/base/graphics/java/android/graphics/Canvas.java
11ea33471e1a14a8594f0b2cd012d86340dd3bd8 23-Jul-2009 Dianne Hackborn <hackbod@google.com> Allow for screen density drawables in compatibility mode.

This change allows us to use drawables that match the current screen
density even when being loaded in compatibility mode. In this case,
the bitmap is loaded in the screen density, and the bitmap and
nine-patch drawables take care of accounting for the density difference.

This should be safe for existing applications, for the most part, since
they shouldn't really be pulling the bitmap out of the drawable. For
the small rare chance of them breaking, it worth getting the correct
graphics. Also this will only happen when there is actually a resource
of the matching density, and no existing apps should have resources for
anything besides the default density (though of course all of the
framework resources will be available in the native density).

As part of this, the bitmap density API has been changed to a single
integer provider the DPI unit density.
/frameworks/base/graphics/java/android/graphics/Canvas.java
a53b828635fce8b6b2d3e3377d74d72070056623 17-Jul-2009 Dianne Hackborn <hackbod@google.com> Add "nodpi" density, and expose a bunch of density-related APIs.

Also update the DpiTest app to use nodpi images, and try to have a mode
where it turns off compatibility though it's not quite working.
/frameworks/base/graphics/java/android/graphics/Canvas.java
4566b79736f236c0f605c57130d1fa954f4642d6 18-Jun-2009 Phil Dubach <phillipd@google.com> Fix Canvas.finalize() for the case where the constructor throws an exception
before the native canvas instance was created.

If the canvas constructors throw an exception (because the bitmap passed in is
immutable or already recycled), the constructor terminates early without
allocating the native canvas instance. For the most part, that's okay, since
the Canvas instance will never be returned to the application. However, the GC
will still call finalize() on the half-initialized Canvas.

The native methods for Canvas all assume that the canvas pointer passed down is
not null.
/frameworks/base/graphics/java/android/graphics/Canvas.java
caf0df1b7f99736aed1a0b923ef278fc4fd0fcca 27-Apr-2009 Mike Reed <reed@google.com> Add call to (new) Canvas.freeCaches() in response to low-memory

This is in conjunction with removing a similar call made by the browser.
Now it will be centralized, and the browser's call site will be removed.
/frameworks/base/graphics/java/android/graphics/Canvas.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/graphics/java/android/graphics/Canvas.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/graphics/java/android/graphics/Canvas.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/graphics/java/android/graphics/Canvas.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/graphics/java/android/graphics/Canvas.java