History log of /frameworks/base/graphics/java/android/graphics/Canvas.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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