4136a0aeac9bb95aa615d4fc1f12378829d26c80 |
|
08-Oct-2014 |
Chris Craik <ccraik@google.com> |
Enable fast jni for simple RenderNode/Matrix/Paint operations bug:17895119 Change-Id: Id83bfd719ec873028f0d4e7e4e4c0702f3bb3dd9
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
6f03023ece076d33d8b171d5398c8ed70abf3f54 |
|
07-Aug-2014 |
Derek Sollenberger <djsollen@google.com> |
Remove dependency on SkPaintOptionsAndroid Change-Id: I579a3503697efe3b8fd9bc809a6c9bfbf735cb1b
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
e9ad3931fae71c8a8cd000fd52d5df4be79b0895 |
|
31-Jul-2014 |
Behdad Esfahbod <behdad@google.com> |
Add fontFeatureSettings to TextView and attrs New API is hidden. Bug: 15246510 Change-Id: I8cdbbd3a36fc280e07569dbb130f8c237062fff5
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
805f6ebf17e2791624bb1a30834b4c1cc65583bf |
|
30-Jul-2014 |
Behdad Esfahbod <behdad@google.com> |
Support FontFeatureSettings in Paint New API is hidden. Bug: 15246510 Change-Id: Idefca06a366de0d87f53d123b5291788448de4d0
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
c41d941f1b999502a2121597edeb3c23d26a2269 |
|
30-Jul-2014 |
Derek Sollenberger <djsollen@google.com> |
Disable fallback chaining in Skia. Change-Id: I6e57b525bc4953a5b8969bb4c3e71b4a53de33d3
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
e21e2a2d1d85d422230c1115abba824338763a88 |
|
29-Jul-2014 |
Behdad Esfahbod <behdad@google.com> |
Clean up Minikin includes Include headers where they are used. Add header guards to MinikinSkia.h Change-Id: If341231625348290d28a7d625561fffc171a8407
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
63c5c78a72a21d57913e8601cc2a1ab72a424a02 |
|
25-Jul-2014 |
Behdad Esfahbod <behdad@google.com> |
Further centralize Minikin interaction Part of the fix for bug 15246510 and others. Change-Id: Ie99000989dfcd7a81aaa1233dec522344f852f31
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
fa80f7491df82d71b7084500519a2195afbea706 |
|
18-Jul-2014 |
Behdad Esfahbod <behdad@google.com> |
Add letter-spacing to Paint and TextView New API is hidden. Bug: 15594400 Change-Id: I5cbe7aebef0b7280eb13924f2a706c0cb4a4688e
/frameworks/base/core/jni/android/graphics/Paint.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/Paint.cpp
|
3d528c403c8945cc326bb656ff0c2e11373401da |
|
26-Jun-2014 |
Raph Levien <raph@google.com> |
Fix build breakage Other files were including GraphicsJNI.h and didn't have Minikin in the include path. This patch eliminates the offending include. Change-Id: I05c9dbf80b93f1731fd0192015e2c9c68a9dd3c6
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
3660789f06c5fbcb81e6c7c79612048bff8f0f66 |
|
26-Jun-2014 |
Raph Levien <raph@google.com> |
Switch all text layout to Minikin This patch switches all text layout operations to use Minikin, removes the USE_MINIKIN #ifdef, and deletes some of the code that was only used in the old TextLayout path (although some more refactoring remains). Change-Id: I51b5c4e2bb46cfd9d204c12b9f16f135c769f5b5
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
d194262f53799ef7cd660729a8f1027263f73e27 |
|
26-Jun-2014 |
Raph Levien <raph@google.com> |
Delete Paint.getTextGlyphs() The Paint.getTextGlyphs() method was used for testing the old Arabic shaper and is entirely obsolete. Note that this is the very last dependency (other than some enums in the header) for the old TextLayout code path. Change-Id: I7b596f0c0942ed50987fc8e0478cd93e667f1f9e
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
e368b6bcfd499543a876b4cae02f1ca563ff1cb6 |
|
16-Jun-2014 |
Raph Levien <raph@google.com> |
Use Minikin grapheme cluster breaking This patch uses the Minikin implementation of grapheme cluster breaking, which improves the behavior of left and right arrow keys for moving the cursor. Among other things, it fixes the behavior of jumping over the "fi" ligature in Roboto. Part of a fix for b/15653110 Improve behavior of arrow keys in EditText Change-Id: I80ca54c973d85c49f23b81d51a0fe07a7a853d81
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
a7aa1b0aa566b2ff310cb89fbc9437de4819f583 |
|
12-Jun-2014 |
Anish Athalye <aathalye@google.com> |
Implement Paint.breakText() using Minikin Change-Id: I36cee2d840ce1bd24a9a06f0c680880396b7398a
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
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/core/jni/android/graphics/Paint.cpp
|
0627ec08dcc2e87c17e9b85f045dfb27dc4884b3 |
|
07-Jun-2014 |
Raph Levien <raph@google.com> |
Support fake italics This patch adds fake italics, using essentially the same mechanism as the fake bold implementation. Also combines fake bold/italic settings with ones explicitly set in the paint. Change-Id: Ia7eb3ddc8a6192d191711ba723ffd0d1d9d93f2e
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
1fc0fa87d42ce9268ece76b85b9edc834593e53a |
|
07-Jun-2014 |
Raph Levien <raph@google.com> |
Support for fake bold in Minikin builds Part of the fix for bug 15436379 Fake bold doesn't fully work (Minikin) This patch queries the Minikin layout for when fake bold is needed, and applies that to both shaping and drawing paint. Also simplifies refcounting (the lifetime of all MinikinFont objects is subsumed by the enclosing FontCollection). Note: the fake bold flag set by the user is ignored in this patch. Fake italics would be possible using the same mechanism, but it's slightly more complicated (fake and user-set textSkewX values would need to be combined, and the latter restored after drawing). Change-Id: Ica2c4604846cbb37e5a783778b18d8993c9d4563
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
817ef4ae79bd39b5e55fc6ca4e3b8e47e114579f |
|
06-Jun-2014 |
Raph Levien <raph@google.com> |
Fix getFontMetrics problems Fixes a number of individual problems. In Minikin builds, gets base font from TypefaceImpl rather than using whatever random font was in the paint. Respects elegant metrics in ascent and descent methods as well as getFontMetrics. Sets fixed ascent and descent values to 1900, -500, which matches the Roboto font. Part of the fix for bug 15467288 "Inconsistent line heights on Minikin builds" Change-Id: I12915f4a62de28932469c7279241eecf7320c47b
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
6bfd7e7df3a9f9ea2f9e57a3552eed7f518be711 |
|
04-Jun-2014 |
Raph Levien <raph@google.com> |
Support for context in Minikin shaping This patch uses the Minikin's new doLayout API that supports context, and has some simple refactoring (pass css as string rather than setting on the Layout object) to use this api. Change-Id: I899474f81d377f3106e95ee3eb8d0fcc44c23ac2
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
854363e3d2fb2a9e41d8719f4a2f0f8b89440a46 |
|
04-Jun-2014 |
Raph Levien <raph@google.com> |
Fix incorrect getStringBounds (Minikin) This patch wires up getStringBounds to do the layout with Minikin to get accurate bounds, and with the correct typeface. It fixes bug 15416575 "getStringBounds gives wrong result in Minikin". Change-Id: I5c020bc372acb1d785a33c3c296239c151bd8c87
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
f2114d5646194100242206b267ddd6e7194b7da9 |
|
02-Jun-2014 |
Raph Levien <raph@google.com> |
Better Minikin integration This patch improves the Minikin integration in a number of ways, including: Software rendering does text decorations and handles alignment correctly. This fixes bug 15139067 "Centered text isn't working". Paint implements getTextPath. This fixes bug 15143354 "Text rendering in Maps Navigation wrong typeface?" Also a bit of refactoring, since there was duplicated code for iterating font runs that's now a static method in MinikinUtils. Change-Id: I4cfdb2c0559982376348325a757d95235fab1768
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
49f0db34811bc374eb6af0a6ba233325ff6f14cc |
|
20-May-2014 |
Victoria Lease <violets@google.com> |
fix argument order in call to SkBlurDrawLooper constructor This fixes all sorts of badness. Bug: 15074512 Change-Id: I5e96983c58d19e0dc2d8fa61d1efa9dcff076ca1
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
4c9355c35a0f62805739823a62ad41ca1cbc6502 |
|
07-May-2014 |
Mike Reed <reed@google.com> |
Frameworks changes to support latest Skia (r14729) Required for a merge in external/skia (I88b4d5cc81c357a8e223bd7860b1029590265200). Includes two cherry-picks: I456df543e1925b280f785c7b3bb81370157f9b09: replace SkRasterizer* with NativeRasterizer* in JNI I98adb200e023369d3ee75f21927fa98f23095a77: Fix Paint.getFlags,setFlags wrt FILTER_BITMAP_FLAG In Paint.setFlags(), turn FILTER_BITMAP_FLAG into a call to SkPaint::setFilterLevel(). In Paint.getFlags(), read SkPaint::getFilterLevel() to determine whether to include FILTER_BITMAP_FLAG in the result. Fixes CTS tests with ToT Skia. Change-Id: I2736f3f68683651574d79a169ff0ab563e0a469e
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
1044a8211d86d4306ee7b075eb2bca9a43f3a492 |
|
15-May-2014 |
Raph Levien <raph@google.com> |
Merge "BiDi support for Minikin"
|
2836c4722a156ec78d7f4101b394885a354f5dd6 |
|
15-May-2014 |
Raph Levien <raph@google.com> |
Merge "Start of Minikin integration"
|
9d9ee3d666c63938311839002ec974673998c6d0 |
|
13-May-2014 |
Raph Levien <raph@google.com> |
BiDi support for Minikin This patch plumbs the bidiFlags for the various text drawing and measurement functions down to Minikin, so that the latter can do layout in a BiDi-aware manner. With the corresponding changes to Minikin, it is sufficient to correctly display RTL text in TextViews. Change-Id: Ie904f297373b9ad418050a474506605c7c127b0f
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
1a73f732f91e97c9c66b808c245ddda36a10e987 |
|
31-Jan-2014 |
Raph Levien <raph@google.com> |
Start of Minikin integration This is the current state of the Minikin integration. All changes are hidden behind USE_MINIKIN #ifdef, so it should be safe to apply. To play with the Minikin branch, set this in your BoardConfig.mk . This change also merges in 64-bit changes that were happenening in parallel. Change-Id: Idd94553bcbe324c5875d0ff06495c966c3e95b7f
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
c29a0a4664a4b9871fadd668b632469a0db240b9 |
|
31-Mar-2014 |
Derek Sollenberger <djsollen@google.com> |
Avoid caching shadow properties in Java & HWUI. bug: 10650594 Change-Id: I6f57df002710bb0567ed7e53fc0bfe96cfd504b8
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
53c0077256afebb0312f01ef4f60a7445da1f5d9 |
|
14-Apr-2014 |
Raph Levien <raph@google.com> |
Add elegantTextHeight text appearance attribute This patch adds an elegantTextHeight text appearance attribute and plumbs it through to the paint. This attribute selects the elegant variant of fonts (when appropriate, which is typically Arabic and indic scripts), and also specifies larger vertical metrics, to avoid clipping. The intent is for this to be the default for quantum themes, but this patch doesn't change any default behavior, just adds the attribute. The larger vertical metrics are applied to top and bottom, but should not affect line spacing in the common case. Also, with the setting, metrics are no longer dependent on the font, so setting a custom font will preserve layout and spacing. Change-Id: If3b7d41f141deff50ca078f479ca90c2aa07829a
/frameworks/base/core/jni/android/graphics/Paint.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/Paint.cpp
|
46cb9bdbf56b27cbf2ab878b41d21e30896a4fea |
|
06-Mar-2014 |
Leon Scroggins <scroggo@google.com> |
Update framework to use M34 version of Skia. These changes are needed due to changes in the Skia API. Depends on https://googleplex-android-review.git.corp.google.com/#/c/439626/1 (Ic3cf846b74d6f10ec30c477b50fd774cc30ad52c) BitmapFactory.cpp: Use SkColorType instead of SkBitmap::Config, where possible. Call SkBitmap::info() instead of deprecated SkBitmap::asImageInfo(). Remove calls to deprecated SkBitmap::getSize64(). Canvas.cpp: ColorFilter.cpp: Matrix.cpp Remove the deprecated SK_SCALAR_IS_FIXED path. Leave in an else case for SK_SCALAR_IS_FLOAT, to allow for eventual SK_SCALAR_IS_DOUBLE path. Graphics.cpp: Like in BitmapFactory.cpp, use new methods for determining the size of pixels. Paint.cpp: Use more precise SkScalar_ToInt versions of macros. TextLayoutCache.cpp: Fix bug in macro definition for HB_SurrogateToUcs4. Use the new name for SkCreateTypefaceForScriptNG. android_view_SurfaceControl.cpp: Replace ScreenshotPixelRef with a Skia pixel ref. This is a merge from master-skia branch: https://googleplex-android-review.git.corp.google.com/#/c/430554/ (Ie11503bcefd3883c466279fde5ce147c8a72b452) Change-Id: Idf15746f93dabeb7862ac02cc6bd925f0dcc68ba
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
3af2a37e057b31617b8f4eeb22ac3ef85c3fd5aa |
|
18-Mar-2014 |
Victoria Lease <violets@google.com> |
malloc some advances Bug: 13506939 Change-Id: I87ad616960c4f16bc55d8b906049dbd4f001d6a5
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
b644a3b84521e2155a5af985a4d4ed305474e567 |
|
17-Jan-2014 |
Derek Sollenberger <djsollen@google.com> |
Updates to the Skia API needed to merge the WebView m33 version of Skia. This is a cherry-pick of 2 CLs: 21969a2b26945da3fd86aef7c93479e4fb359a65 c7a581cf7691db5c61e6694aa51daaa994004bd9 Change-Id: I6fd9366fbba0a336de1df794be9497983bfd13ae
/frameworks/base/core/jni/android/graphics/Paint.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/Paint.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/Paint.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/Paint.cpp
|
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/core/jni/android/graphics/Paint.cpp
|
2696797939fdf3b236635998b2739aba87e68ebb |
|
04-Sep-2013 |
Derek Sollenberger <djsollen@google.com> |
Revert workaround for Skia bug now that Skia has been fixed. bug: 7170836 Change-Id: If357767a5f66d539f775bce766e963b3d0df38bf
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
8870538f7c8d32187255707bc3217bd3625d397e |
|
15-Jun-2013 |
Victoria Lease <violets@google.com> |
make setHinting(HINTING_ON) kNormal_Hinting Previously, the default hinting mode for a freshly-constructed Paint object is equivalent to Skia's kNormal_Hinting mode, in which font hints are respected if available. Calling Paint.setHinting(HINTING_ON), however, is equivalent to setting Skia's kSlight_Hinting mode, in which font hints are ignored in favour of freetype-generated autohints. This discrepancy is bad for a variety of reasons: - Once Paint.setHinting() has been called, it is impossible to return to the default hinting level. - Calling paint.setHinting(otherPaint.getHinting()) can result in paint having a different hinting level than otherPaint. - Paint.setHinting(HINTING_ON) actually results in font hints being ignored, which is perhaps the opposite of the intended behaviour. This commit resolves these discrepancies by making HINTING_ON correspond to Skia's kNormal_Hinting setting. Change-Id: Iefb8e051ef53bea783e6f3be37748985ec397bc5 Bug: 9466164
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
d7a80774f0a2175f9ee81a7741f9a171c78e0b8b |
|
28-May-2013 |
Derek Sollenberger <djsollen@google.com> |
Modifications needed for updating Skia to r9286. bug: 8719528 Change-Id: I260fefb93c5a8c5dec86acdec66cbe55a2ee8a92
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
626d3c228116103e95d4429b06dad70f9812561a |
|
27-Mar-2013 |
Victoria Lease <violets@google.com> |
bidiFlags != SkPaint::Flags We've a number of native functions in the text layout path that take a bidiFlags argument. We've a number of callers of those functions passing in SkPaint::Flags in that slot. This completely breaks text directionality for the affected functions, as SkPaint::kAntiAlias_Flag happens to share values with kBidi_RTL, resulting in anti-aliased SkPaints measuring text as if it were RTL, and non-anti-aliased SkPaints measuring text as if it were LTR, regardless of the actual text directionality. Oops! To address the issue, this commit replaces erroneous calls to SkPaint.getFlags() with the value of Paint.mBidiFlags, and includes the necessary plumbing to get that value where it needs to be. Bug: 8471481 Change-Id: I2d04b70defed3130fc1ad13f4c9098f5fce4ffde
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
665f02c66702b77db25e950ff433230186bc3243 |
|
20-Mar-2013 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies - remove the ICU related methods and update the methods using the "reserved" argument - update to CTS in another CL too Change-Id: I5509736568c342d9d17bfeafc17951117ab5d3cc
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
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/core/jni/android/graphics/Paint.cpp
|
a4bf8114a73371b51a0eba9d5d61dfeb597a1abb |
|
15-Mar-2013 |
Fabrice Di Meglio <fdimeglio@google.com> |
Revert "fix argument mismatches in Paint JNI" This reverts commit b61fb10fe435b74a761e82f517abd0320f22193e.
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
b61fb10fe435b74a761e82f517abd0320f22193e |
|
15-Feb-2013 |
Victoria Lease <violets@google.com> |
fix argument mismatches in Paint JNI Paint.getTextRunCursor() no longer has a "flags" argument on the Java side. The native side, however, still had the argument, and was being called with misaligned arguments, causing all manner of madcap fun. Also, the version of Paint.getTextRunCursor() that took String as an argument needed to lose the "flags" argument, as well, to prevent an infinite loop in the CharSequence version of the function, which was supposed to be calling the String version but was actually calling itself. Bug: 8201224 Change-Id: Iad0dabaf81185f29a082566cc64590f2ba9bc31c
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
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/core/jni/android/graphics/Paint.cpp
|
059e12ccd20f5c249724a8362d6bac325334ea76 |
|
29-Nov-2012 |
Romain Guy <romainguy@google.com> |
Use LruCache instead of GenerationCache in libhwui Change-Id: Ic26ddc7151eb5462bcd243b21daf7187ed6d3bec
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
577b07197b1bf1b3903e0bc0f3d48fabfd927b2a |
|
05-Oct-2012 |
Raph Levien <raph@google.com> |
Fix for 7281523 android.text.cts.SelectionTest#testMoveRight failures The failures were caused by the implementation of doTextRunCursor passing a too-small value for contextCount into the underlying getTextRunAdvances call (it wasn't accounting for the start offset). Thus, when getTextRunAdvances made a copy of the text for its cache key, it was getting a partial copy. This patch fixes the size so the cache key always has a full copy of the text. Change-Id: I57e3ac6de7aef0e1f1c7000dc3d653f9b0d623d2
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
c1eff0857ebc6abce48ba8c267ab32109dd45ef0 |
|
14-Sep-2012 |
Raph Levien <raph@google.com> |
am e5905684: am eceb3171: am f4afc401: Merge "framework: fix bug for uninitialized variable" * commit 'e590568417aa824e7b0e76ae727556d329cb57cf': framework: fix bug for uninitialized variable
|
46e942d500d5ce67a58269cbac3307deca6a5c9f |
|
27-Jul-2012 |
Zhou Chang <chang.zhou@intel.com> |
framework: fix bug for uninitialized variable Some application display error due to uninitialized varibale. This patch fix the bug Change-Id: I660169e325ffae60d95c7774aaaeaebf693adf3d Author: Chang Zhou <chang.zhou@intel.com> Signed-off-by: Chang Zhou <chang.zhou@intel.com> Signed-off-by: Chong Xing <chong.xing@intel.com> Signed-off-by: Hongyu Zhang <hongyu.zhang@intel.com> Signed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 45356
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
ac1cbaf2e5575ac75a0160e13089d51a0bb232fa |
|
18-Jul-2012 |
Billy Hewlett <billyh@google.com> |
DO NOT MERGE Han Preference Cherry-pick Ib5dd86950156c5a438f25c289acb839206bb455a from master. Data: label MTLmr3m with "ja" locale attribute, fallback_fonts-ja.xml removed, as we only need a single fallback font file Code: Add locale and variant to TextLayoutCache. Paint.java sets textLocale as the language (for example, "ja") rather than the language/locale concatenated (for example "ja_JP") This checkin, along with Change-Id: Id8c91ae0be6cad8a7ef77a0cd5803676290986c1, allows text view objects to set their locale dynamically and skia will use the correct font for the locale. Change-Id: Ieb60b0d7a39fcfef4f8ce90cd4f6065d33673710
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
517825f1a9f14f92908bd7859b91b927c2eec6d9 |
|
07-Apr-2012 |
Fabrice Di Meglio <fdimeglio@google.com> |
Add Paint.setTextLocale() - will be used for better shaping CJK and other goodies Change-Id: If64945a337edd915f5ebb88f04b6fd18e92ca587
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
a731b082b2c43204e6e9f927ab82fb732934a83b |
|
24-Jan-2012 |
Fabrice Di Meglio <fdimeglio@google.com> |
Code cleaning: centralize use of #if USE_TEXT_LAYOUT_CACHE - also clean some destructors (was not quite compulsory because they are related to some Singletons) Change-Id: I3091cac7b38628cda593d72570ba7a5d7ea2a15c
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
bd901dee317d10c6a921922c3d7d788b90306c82 |
|
21-Jan-2012 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix bug #5846413 "phone" keyboard layout is broken on master - was a subtle regression introduced when fixing bug #5753006 - as we are now using SkPaint::kGlyphID_TextEncoding (glyph encoding) instead of SkPaint::kUTF16_TextEncoding (UTF16 encoding), we need to force the UTF16 encoding in some cases that are NOT going thru the TextLayoutCache / Harfbuzz shaping - fix also breakText() the same way - also clean some old comment - Warning: depends also on a CL from Skia for having getBaseGlyphCount() "const" Change-Id: I3d1fc87f070884876c679b33541f810fbfb5df3f
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
c511bee87cda99a252d1a62487f47c8f05aee78c |
|
05-Jan-2012 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix bug #5753006 Garbled Labels in Maps - it was a regression introduced into this CL: https://android-git.corp.google.com/g/#/c/154240/5 - basically needed to set the GlyphID encoding to the Skia Paint as we are now using glyphID resulting from the Harfbuzz shaping - also define GlyphID encoding as the default on the Paint class Change-Id: Idb7c2c57ac67595425ce3be9421258962690fcdd
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
b02d0ca5553300063e4332192632312600caf4b9 |
|
08-Dec-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Clean TextLayout code and remove RTL_USE_HARFBUZZ - remove dependencies on ICU - use TextLayouCache - remove RTL_USE_HARFBUZZ define (we *are* using Harfbuzz now) - also fix compilation warning Change-Id: I022e11703438d07032e49e42724184f6bf16653e
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
0af10b54bf110653b74cb92793484b412a90b657 |
|
19-Nov-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Improve TextLayoutCache performances - introduce TextLayoutEngine - reduce calls to HB_NewFace as they are opening the font files under the cover - refactor code for removing FontData structure - fix logging Change-Id: Id9658fcd454b74c34ecf4e9dfd1bd2201e04b988
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
5c863f741e8e484bb39decd516c9fa4c6322e671 |
|
06-Oct-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix bug #5371117 Regression : The Hebrew / Arabic text behavior in ICS latest build is wrong - welcome back start / count - goodbye log clusters - clean Paint code - make private some functions as they should be - improve memory allocation (create only one Shaper and reuse it for for shaping the runs in the same input text) Change-Id: I89a320c7f041319851308c8c9a919fbeafa82cdd
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
79df5323e7ed541b854cea5684a89e8be8c2dfc9 |
|
20-Sep-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits - makes TextLayoutCache not carring about start/count. Basically he will cache the result for the full string and gives back the "chunk" corresponding to start/count - changed the TextLayoutCacheValue API to take start/count parameters - add Harfbuzz LogClusters in TextLayoutCacheValue as it is needed for extracting the start/count "chunk" Change-Id: I4b38a4442428606de9a093303bbbe98181e1f89c
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
9c418dbc56efd334c68872d281f75138e16eae46 |
|
18-Sep-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Revert "Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits" This reverts commit d686d76814f18061e06995df0d5de9feb9f70a7e
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
d686d76814f18061e06995df0d5de9feb9f70a7e |
|
14-Sep-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits - makes TextLayoutCache not carring about start/count. Basically he will cache the result for the full string and gives back the "chunk" corresponding to start/count - changed the TextLayoutCacheValue API to take start/count parameters - added the Harfbuzz LogClusters in TextLayoutCacheValue as it is needed for extracting the start/count "chunk" - fix potential issue of cache key leaking Change-Id: I9276f9bec744e8de36349acfba8429f7c6f83394
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
51f383d65f9ee3c7d73d0508b576550e7998c5b5 |
|
14-Sep-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix some TextLayoutCache issues - wrong ContextCount was passed - better logs Change-Id: Ie78ba70f98f3cf017c168ab8848cc080fc175f31
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
f43fa5746ee5b81a6e386d36594094d079ac8160 |
|
13-Aug-2011 |
Dianne Hackborn <hackbod@google.com> |
Turn off hinting by default for higher density displays. Also adds an API for apps to control whether hinting is used. Change-Id: I1a06b06255fbb8d0f02a8ce48c2cd60019088ed3
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
6ab90ed017fb52aac4493a2fac897299d345874f |
|
09-Aug-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Solidify and optimize Paint text related APIs - better check parameters consistency - return calls as soon as possible (when null or empty text) Change-Id: I46744e517b04e3fba0ec37132d7de400177f214b
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
8fb507171f68d4170cfeb1187ee7d1f70f98917d |
|
14-May-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix bug #4415576 Gmail text looks broken - pass correct "contextCount" when needed Change-Id: I56ebd9486e99e6ca5a3973ec403cf1ced874b4c3
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
0a1413e4bf9dcda2a8abb2287e43f612a7fb2453 |
|
22-Apr-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Clean getTextRunAdvances() APIs - remove ICU reference in API names - use a "reserved" int parameter to pass either "0" for Harfbuzz or "1" for "ICU" Change-Id: I88b4f76feafd203a6999cd7349402fa36a9a4b2a
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
4f810c8535055bd9a8d89a7d1ba0a7c712a8843d |
|
19-Apr-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Use Harfbuzz for Paint drawText / measureText / breakText APIs Change-Id: I35aa02bfd45629bf5c560f98a28399ff3d0fc900
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
8451b25a4422656bbd6657a5855e69c0f4d53c74 |
|
08-Apr-2011 |
Elliott Hughes <enh@google.com> |
Use jniThrowException for exception throwing from native code. I'll do media and the generated gl stuff separately. Otherwise, this cleans up all direct calls of ThrowNew/Throw except the one in the binder that needs to remain. Change-Id: I8f95a5f020f53b25926ad31ac0c9477ddf85d04b
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
1de9e7a9dffb4391a446000f748e4c017d948f6b |
|
05-Apr-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Code refactoring for TextLayoutCache - rename TextLayoutCache entry name - update references to old name - better variable names in TextLayoutCache::getRunAdvances() Change-Id: I5173fbc8af79437ce4786084580426f130120ce8
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
eee49c699c035ffba188417489f40d34f587d65c |
|
25-Mar-2011 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix text redering issue where the text was sometimes truncated - mostly was visible in Settings apps / Wi-Fi networks summary info for each network - correctly setup the local SkPaint for advances computation - improve test app for adding live resizing Change-Id: Ia031fe1b115b521ba55c7e68f2a26300f02e48ca
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
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/core/jni/android/graphics/Paint.cpp
|
d98aa2de9ab18e09c2be1997f41212740f51f6e6 |
|
26-Oct-2010 |
Chet Haase <chet@google.com> |
DisplayList optimizations and fixes. We now use a copy of SkPaint objects to avoid having it changed from under us. We reuse copies that have not changed. We also copy the SkMatrix every time to avoid the same problem. Change-Id: If3fd80698f2d43ea16d23302063e0fd8d0549027
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
27f0b17d853d8bef918c3d869044e50cf3904ee3 |
|
22-Oct-2010 |
Chet Haase <chet@google.com> |
Fix native resource leak when OpenGL renderer is not being used. Native resources (bitmaps, matrices, paints, shaders) are shared when display lists are used, and a refcounting system is in place to take care of disposing when all clients are finished with them. But the cache where these refcounts are tracked is not enabled when the Open GL renderer is not being used. This results in the native destructors not being called, and the resources are leaked. Change-Id: Ic7aeb55e4636dcad229846601407e596160346e6
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
5c13d89c1332fcc499379b9064b891187b75ca32 |
|
08-Oct-2010 |
Chet Haase <chet@google.com> |
Optimizing display lists by referencing pointers to resources instead of copying them Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
1e45aae5de003657e5d18f74d34998f5de5db5b7 |
|
14-Aug-2010 |
Romain Guy <romainguy@google.com> |
Add drop shadows. Change-Id: Ic6a72409d4785968d1fbdff229f17ee5c00b240b
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
f7cb1f75fdaedf996cab7c4690b080adc7bc5b97 |
|
02-Jul-2010 |
Doug Felt <dougfelt@google.com> |
Support bidi/shaping for getTextPath Move layout-related code into separate class since it's needed by both canvas and paint. Change-Id: Iba89a1d94d7cca650255ffa3cbc952b988a51b54
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
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/core/jni/android/graphics/Paint.cpp
|
afa78967b8553443aa32579d78970a076d7581f6 |
|
29-Sep-2009 |
Dianne Hackborn <hackbod@google.com> |
Hack to fix issue #2125365: Sports Trivia compatability with Eclair Adds a mechanism to tell Paint the scaling factor its target canvas will have, for it to compute font metrics based on the correct font size. Only TextView uses this, but that is enough for the large majority of apps. Change-Id: I6cacaa0dd26d40ee3ad959bed0028678d6e9016e
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
3d63e0119dc763ed0a06fd7498375746fd391d80 |
|
27-Jul-2009 |
Mike Reed <reed@google.com> |
explicitly set the hinting level for android apps (to match the old default)
/frameworks/base/core/jni/android/graphics/Paint.cpp
|
290f5baf9192752287723a29ede4399ae3e4c826 |
|
19-Jun-2009 |
Mike Reed <reed@google.com> |
when we reset a paint, it should return to the state it was in when it was first created. for java, this means setting its text-encoding to UTF16...
/frameworks/base/core/jni/android/graphics/Paint.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/Paint.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/Paint.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/Paint.cpp
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/core/jni/android/graphics/Paint.cpp
|