History log of /frameworks/base/core/java/android/text/DynamicLayout.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
776abc24cdd18610232a50b997cce3cffa74609b 07-Mar-2014 Adam Lesinski <adamlesinski@google.com> Uses VMRuntime.newUnpaddedArray for ideal array sizes

Bug:13028925

Change-Id: I0a9301248b10a339afbdc5e4ffe3310ac4fa1fb7
/frameworks/base/core/java/android/text/DynamicLayout.java
63b3eb65234c8a8b9224c262442816cc429560ef 03-Oct-2013 Raph Levien <raph@google.com> Fix Text appears on top of existing text when composing in gmail.

Fix for bug 6473708. This patch changes from "last update wins" to
merging together the change regions, in the logic of deciding which
blocks need to be updated for painting, so that when there are multiple
changes batched for a draw, they're all taken into account.

Change-Id: I183d453c436125e5efec7031b4d61b43989653f9
/frameworks/base/core/java/android/text/DynamicLayout.java
955beb2b96a78cf6ee990d0f20bcaf2d22ce608b 10-Dec-2012 Sangkyu Lee <sk82.lee@lge.com> Optimize drawHardwareAccelerated method in Editor class

When inserting a new line or breaking a line,
every display list was invalidated and rebuilt before.
However, we can reuse the display lists above intactly and also
reuse the display lists below with only updating drawing locations.

This patch reuses the display lists if possible.
The display lists above the inserted line are just reused
and the display lists below are reused with only updating
drawing locations not fullly rebuilt.

mIndexOfFirstChangedBlock is the index of the first block
which is moved by inserting or breaking a line.
So the display list whose index is >= mIndexOfFirstChangedBlock
only needs to update its drawing location.

Change-Id: Ica20deb0ebb5750de21356ed31fa9f86e657ff92
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
/frameworks/base/core/java/android/text/DynamicLayout.java
71afc39d68413d125d46ea69e6c9fb077016bb9b 10-May-2012 Gilles Debunne <debunne@google.com> Cut long text into multiple DL at start

Bug 5763685

To improve performance, preventively cut the the into display
list of 3-10 lines of text. Further updates to small parts of
the text (such as adding an underline on a word) will only
invalidate and redraw the affected sub display list.

DLs are aligned with paragraphs, just like they will be during
text edition.

Change-Id: I0d60debc7fdaea8b29080a6eacb2d60205e7d547
/frameworks/base/core/java/android/text/DynamicLayout.java
157aafcbee0eabda798a3be406ccc4200ee86756 20-Apr-2012 Gilles Debunne <debunne@google.com> TextView's sub display lists have tighten bounds

An editable TextView caches text rendering inside an adaptive
number of sub display lists. The bounds of these use to be those
of the entire View.

This CL creates block display lists with tighten bounds, so that
(a still-to-be-implemented) quick rejection can occur.

Also cleaned-up the contradictory translations that were used to
handle the TextView's internal scroll and removed the invalidation
of display lists in that case.

TODO: When internal scroll sets a tighter clipping rect, quick
reject the creation and display of the clipped display lists.

Also renamed blockEnds to a more explicit blockEndLines.

Change-Id: I7d79bea78d06d19b6935aef75ff7aa7df2594050
/frameworks/base/core/java/android/text/DynamicLayout.java
1e130b2abc051081982b5a793a18a28376c945e4 15-Mar-2012 Gilles Debunne <debunne@google.com> Added a unit test for DynamicLayout#updateBlocks

Change-Id: I1824ebeae2bbb5c60a65de36fe1696bf003347c9
/frameworks/base/core/java/android/text/DynamicLayout.java
cde6adf45c90ad3fdc94446ede6a228ce264c886 16-Mar-2012 Romain Guy <romainguy@google.com> Fix the build

Change-Id: I6de62c7bfaecd85810178f58707157466291eca3
/frameworks/base/core/java/android/text/DynamicLayout.java
33b7de85b6918b7714641f12f1ba2ff03a344740 12-Mar-2012 Gilles Debunne <debunne@google.com> Multiple display lists for editable text

Bug 5763685

Long text in a ScrollView (not when the View's internal
scroll is used) is cached as a unique display list when hardware
rendering is on.

As a result, each time the text is edited, the entire display
list has to be updated, which takes a significant amount of
time (up to 500ms for a few thousand lines), proportional to the
size of the text.

This CL splits the text into multiple display lists as the
text is edited. The boundaries of the display list are aligned
with paragraphs.

There is still an issue when the number of lines changes: onLayout()
is called which invalidates all the display list. When the source
of that change is line wrapping and not a change in the view's
dimensions, we should be able to simply shift down the previous DL
instead of re-creating everything.

Change-Id: I7de49a1e5637cdfc9ef06b64b1ec4b61d9ea2415
/frameworks/base/core/java/android/text/DynamicLayout.java
d300e75eff0d5e54390400cbd3f80dc4cea8b617 17-Oct-2011 Gilles Debunne <debunne@google.com> Wrong word cut at end of lines with spaces

Bug 5185017: when the line length is exceeded at a space character,
we use the previous ok width, and the last word is wrapped to next line
although it fits.

This back-track also generates problem with the span parsing, where the
spanStart indexes are no longer monotonuously increasing.

Plus some refactoring in this code (unused parameters, calls to out())

Change-Id: Ia8cd310a732752af3bd370bf0a16db23d40e83f2
/frameworks/base/core/java/android/text/DynamicLayout.java
ad0b051b133baf92f199c96a8ac1e81b3393190c 05-Oct-2011 Fabrice Di Meglio <fdimeglio@google.com> Revert "Fix bug #5387832 [UI/Visual] Address of the website is not displayed properly(second line of the address is partly shown)"

This reverts commit a130e5f59dc6b2117e4c1a8ffef54828e9ea44c7
/frameworks/base/core/java/android/text/DynamicLayout.java
a130e5f59dc6b2117e4c1a8ffef54828e9ea44c7 29-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5387832 [UI/Visual] Address of the website is not displayed properly(second line of the address is partly shown)

- make DynamicLayout honor max lines
- make StaticLayout.generate() take maxLines as a parameter instead of using the field mMaximumVisibleLineCount

Change-Id: I9eafb1be4b8bb2aa881514955a6903f559cb6a1e
/frameworks/base/core/java/android/text/DynamicLayout.java
09175735c562652be1a1b0dc0f941d36ac4f076a 26-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5344067 android.text.DynamicLayout.sStaticLayout can hold onto an Activity, potential memory leak

- make the StaticLayout constructor not depending on the text as we just need the "generate()" call to be done

Change-Id: I65249e65ed6446b6ac13dbf8c8f58fcdf54046cb
/frameworks/base/core/java/android/text/DynamicLayout.java
8059e0903e36cbb5cf8b5c5d5d653acc9bbc8402 11-Aug-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #3388534 Long file names are improperly displayed when played

- force ellipsising when there are more lines found than maxLines
- do not care about lines when we have reached maxLines
- also fix relayouting when changing maxLines thru setMaxLines()
- do not allow START / MIDDLE ellipsis when there are multiple lines
(and print a log accordingly)

Change-Id: I90f5a7f5200a220aceee01fb7300bec2c4c3a075
/frameworks/base/core/java/android/text/DynamicLayout.java
b724c346e19d63d7ff194b2b06c4a1e0f7bc07b7 13-Aug-2011 Amith Yamasani <yamasani@google.com> Revert "Use a weakreference to prevent the static variable from holding an Activity."
Bug was fixed in a different way.

This reverts commit 352c01e2133b71918fa1cb2783a0a10e56117775.
/frameworks/base/core/java/android/text/DynamicLayout.java
352c01e2133b71918fa1cb2783a0a10e56117775 26-Jul-2011 Amith Yamasani <yamasani@google.com> Use a weakreference to prevent the static variable from holding an Activity.

Bug: 5057764

Change-Id: If734e3ef4928b21a5e31e0ad50c97da287c3c116
/frameworks/base/core/java/android/text/DynamicLayout.java
e5ea4403ce58982522554b7ff23f41e6551923c1 01-Aug-2011 Romain Guy <romainguy@google.com> Plug memory leak in EditText.

Change-Id: I0b42c23ceeaa958d02255945c35ff6807c177114
/frameworks/base/core/java/android/text/DynamicLayout.java
cb379120456d8065d742021fc5c66748fc8a11a8 07-Jul-2011 Doug Felt <dougfelt@google.com> Implement textDirection heuristic selection.

Change-Id: I2fcf18de573f2d66494fa5ed61e4273c3c6078c7
/frameworks/base/core/java/android/text/DynamicLayout.java
0a4db3c5270440eeb7e4e44a7029926e239ec3bd 14-Jan-2011 Gilles Debunne <debunne@google.com> Pixel were missing on the last line of text when using MaxLines.

Bug 3295544

Only the last line of text includes the bottomPadding (extra line
spacing below the characters' descent. When The text is clipped using
maxLines, the desired height correctly added this value, but getLineTop
and getLineDescent are also used when the layout is drawn.

The fix is to make the layout aware of its clipping so that these
values are correctly updated.

Change-Id: I703656cf45022d34a90f55f0ed8fc5e4b30f80b1
/frameworks/base/core/java/android/text/DynamicLayout.java
d6e568c4f3b30431a0086e647f38d24ffd81457a 25-Jan-2011 Gilles Debunne <debunne@google.com> Removed warnings in DynamicLayout

Change-Id: Ied1c330795412d0bdcac1236b466951112fabc7d
/frameworks/base/core/java/android/text/DynamicLayout.java
9f7a4442b89cc06cb8cae6992484e7ae795323ab 01-Mar-2010 Doug Felt <dougfelt@google.com> Enable nested bidi levels in a paragraph.

Changes the internal representation of direction information in the Directions object to be a visually-ordered list of start/length+direction pairs instead of a list of directionality inversion offsets.

Rewrite Layout.getOffsetToLeft/RightOf to use run information instead of width metrics.

Remove java Bidi, use native. Switch bidi tests to test native, expect levels instead of dirs.

Add test of directionality. Leave in switch to turn new code off and restore previous behavior for now.

Change-Id: Iea8bb46c678a18820e237c90f76007a084c83051
/frameworks/base/core/java/android/text/DynamicLayout.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/text/DynamicLayout.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/text/DynamicLayout.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/text/DynamicLayout.java