History log of /frameworks/base/core/jni/android/graphics/NinePatch.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dccca44ffda4836b56a21da95a046c9708ffd49c 21-Mar-2016 sergeyv <sergeyv@google.com> Reland: Move text logic from jni to hwui level

Initial CL: https://googleplex-android-review.git.corp.google.com/#/c/886854/

Change-Id: I9dfd85fe1d2a2c44f4360c8a29fd58d80e6f31c8
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
afbd0f1fef46ef0ddf633dfde0de724db3da1405 21-Mar-2016 Sergei Vasilinetc <sergeyv@google.com> Revert "Move text logic from jni to hwui level"

This reverts commit a7f6bba1a3565c19715e878dfe7f0e01022944ff.

Change-Id: If4f36f87a85411b6128fd92d391313803ccaf9dd
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
a7f6bba1a3565c19715e878dfe7f0e01022944ff 16-Mar-2016 sergeyv <sergeyv@google.com> Move text logic from jni to hwui level

bug:25865834
Change-Id: I2d8c9c9544afcb5ce1784f732aed3e54e0eda372
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
434a481b2191562582c79be29f24c2e0b5ca60d0 24-Sep-2015 Elliott Hughes <enh@google.com> am ea1831d2: am b57dd722: resolved conflicts for a884d81e to stage-aosp-master

* commit 'ea1831d211ea0e6b2d161c714bb0786369ef2df5':
constify JNINativeMethod function pointer tables
b57dd722f1dc0663417da37d3a82f8283ad3c982 24-Sep-2015 Elliott Hughes <enh@google.com> resolved conflicts for a884d81e to stage-aosp-master

Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
76f6a86de25e1bf74717e047e55fd44b089673f3 19-Sep-2015 Daniel Micay <danielmicay@gmail.com> constify JNINativeMethod function pointer tables

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

Change-Id: Ic095291fe55911c6501c1bdefa4b8da973c77319
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
edca320a2b42011f98c308fdf25fc0494c6a5454 10-Jul-2015 Derek Sollenberger <djsollen@google.com> Add ninePatch support to Canvas.h

Change-Id: Ib3202fd7c5b9f35853f286abe84b3ed009df1a81
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
47b3441537b182a61d3a41d39095c40761d49457 13-May-2015 Mike Reed <reed@google.com> SkScalarDiv and its variants are deprecated

Change-Id: Icf2c13d0b19360753c9eed5f991b056201eb63df
(cherry picked from commit 4069f39b30084c4c907ce9921275975ff3d1b9d5)
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
4069f39b30084c4c907ce9921275975ff3d1b9d5 13-May-2015 Mike Reed <reed@google.com> SkScalarDiv and its variants are deprecated

Change-Id: Icf2c13d0b19360753c9eed5f991b056201eb63df
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
7c103a36f60b690e3fe83c40210e1cb0c76bba43 16-Apr-2015 John Reck <jreck@google.com> Remove Bitmap#getSkBitmap

Change-Id: Ifb9047b426122d3e5a445eb7a0eb3fce38dedf27
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
1ff961dd6d51247e82e41de052f04fd0b577f09b 17-Apr-2015 John Reck <jreck@google.com> Revert "Remove Bitmap#getSkBitmap"

This reverts commit 4bd981ec533a65e8dee053a0a709b484770b0a76.

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

Change-Id: Ifb9047b426122d3e5a445eb7a0eb3fce38dedf27
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
b3d50e007523d1ada0866d384c391c72ac1a3577 29-Jan-2015 Derek Sollenberger <djsollen@google.com> Rename Canvas::getSkCanvas to Canvas::asSkCanvas

Change-Id: I967a45698d382e54eaa5ff64fa8909ff00908650
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
a2732a2bf98f7dbd063f4e5679f5b8bfcbec2698 18-Dec-2014 John Reck <jreck@google.com> Stop pretending USE_OPENGL_RENDERER is a thing

Change-Id: I732b490431fe90eafa00a00f3b5429f0d3a067e6
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
7d13d9db1ef90063cb542ccd6554042a6a3263b7 21-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 3fc5e3ca to lmp-mr1-dev-plus-aosp

Change-Id: Id8286e5a4381315a6060251a8055b0f1d1a96019
ed6b9dff563c5e22f040ff37e12c0d771e0478ae 21-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Consistency in core/jni

Make consistent use of core_jni_helpers for registration.

Translate some #ifdefs into const bools.

Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
a35778c799e8073a42b9e22191bde9d838327ab7 06-Nov-2014 John Reck <jreck@google.com> Yank ResourceCache out of Caches

Bug: 17947547

Pull the ResourceCache (aka, ref-counting side channel) out of
Caches so that DisplayListRenderer doesn't use Caches, avoiding
the risk of instantiating Caches on the wrong thread or
without a GL context

Change-Id: I7d63b70b3b0a0163308c5dedd6ef255eadebe8fd
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
6ba30b85ddfbe37c338ee8dde3dd33322eb38d47 15-Jul-2014 Behdad Esfahbod <behdad@google.com> Add android.Paint that inherits SkPaint

The idea is that extra paint parameters that only affect text layout
(not rendering) will go in android.Paint instead of going into
SkPaintOptionsAndroid. We will eventually move those out of SkPaint
too.

This is currently implemented in PaintImpl.cpp. Will be renamed when
current Paint.cpp that has JNI bits is moved to android_graphics_Paint.cpp.

Change-Id: Iba66c34dea5da503a13b9c864cb9f2211ac4ba7d
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
2e0103eb340822f9d580c1aa8492bae8394b8243 04-Apr-2014 Leon Scroggins III <scroggo@google.com> Remove SkFloatToScalar.

Now that SkScalar is always float (it may someday be double, but
float to double is trivial), remove callers of SkFloatToScalar,
which is deprecated in Skia.

BUG:13694396

Change-Id: I524a9bb6f7702bc810bac55fb9d2cd5361a01cf7
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
e3b0a0117a2ab4118f868a731b238fe8f2430276 27-Jun-2013 Romain Guy <romainguy@google.com> Refcount 9-patches and properly handle GC events

This change adds refcounting of Res_png_9patch instances, the native
data structure used to represent 9-patches. The Dalvik NinePatch class
now holds a native pointer instead of a Dalvik byte[]. This pointer
is used whenever we need to draw the 9-patch (software or hardware.)

Since we are now tracking garbage collection of NinePatch objects
libhwui's PatchCache must keep a list of free blocks in the VBO
used to store the meshes.

This change also removes unnecessary instances tracking from
GLES20DisplayList. Bitmaps and 9-patches are refcounted at the
native level and do not need to be tracked by the Dalvik layer.

Change-Id: Ib8682d573a538aaf1945f8ec5a9bd5da5d16f74b
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
b13b9bdad2baf6ad1ec2e56b6b7598fa20f55fc4 18-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring.

step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
71f2cf116aab893e224056c38ab146bd1538dd3e 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
4cb1753ec6e90d7e747880c599dc1c164a568cf3 13-Apr-2011 Elliott Hughes <enh@google.com> Remove useless forward declarations.

Change-Id: I8f191367acb18ea9a3f807e791099e0485b1b249
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
69a017bc1d1649350f830dfada5c6ed5eac0b770 08-Apr-2011 Elliott Hughes <enh@google.com> More JNI exception-throwing cleanup.

There are a few (unimportant) bug fixes here. There were several attempts to
throw exceptions in situations where there's already a pending exception.

There were also cases where the code was wrong; it was checking for a NULL
return from Get*ArrayElements and throwing NPE, but passing NULL is an error
that causes a crash and a NULL return means an exception has already been
thrown. I didn't want to get into the Scoped* classes just yet, but that
was by far the easiest way to fix this.

Change-Id: I0b31160ee51b96e82539f6514b8412b149dba7c3
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
8cae124af2142687a6833dbaab8a43df6dd67b43 10-Sep-2009 Dianne Hackborn <hackbod@google.com> Various cleanup around resources and nine-patches.

Remove the stuff that doesn't use preloaded drawables when in
compatibility mode, since this works fine ever since we were able
to deal with drawables in a different density than the canvas.

Change the snapshot function on View to return a snapshot at
the same size that will actually be drawn on screen (when in
compatibility mode), to be able to show scaling artifacts and
all.

This change was original an attempt to fix issue #2101917: Text
field edges appears to be improperly rounded. That turns out to
probably be something deeper in the graphics system, but also
included here is the debugging code I did to try to track down the
problem to make it easy to turn on again later.

Change-Id: I34bfca629639c7ff103f3989d88874112ef778d9
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
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/core/jni/android/graphics/NinePatch.cpp
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/jni/android/graphics/NinePatch.cpp
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/jni/android/graphics/NinePatch.cpp