487 Commits

Author SHA1 Message Date
Derek Sollenberger
00a33a8ce8 Update Canvas.getClipBounds to not account for AA clips.
This preserves the existing behavior at the SDK level while skia
investigates a more comprehensive solution.

bug: 8986473
Change-Id: Ief82dcfd47f1ba08d28d43402b3c28694f94f2e4
2013-05-16 09:31:27 -04:00
Derek Sollenberger
bee78812d0 Merge "Fix bug where we incorrectly clipped the bounds to the device size." into jb-mr2-dev 2013-05-09 18:23:57 +00:00
Raph Levien
dde8e539c3 Merge "Fix bug 8717690 Full-width Latin Letters Garbled on Tumblr App" into jb-mr2-dev 2013-05-09 18:04:39 +00:00
Derek Sollenberger
708144e828 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
2013-05-09 14:00:29 -04:00
Raph Levien
dd0a91294b Fix bug 8717690 Full-width Latin Letters Garbled on Tumblr App
For fullwidth latin (or, more generally, a font considered as a complex
script, but not supported by the font specified), and for a font other
than a system default font, we were getting a mismatch in baseGlyphCount
between the shaping and painting fonts.

This patch preserves the original typeface in this case. In that sense,
it is a slightly more general fix for bug 8127795.

Change-Id: Ibdbfdb34eb7dc39cc8f0784a67c93c9af4ce6ab2
2013-05-06 15:00:41 -07:00
Raph Levien
9d47db23ff Fix for bug 8695466 GPOS combining mark positioning broken before space
This patch makes segmentation into script runs behave the same in RTL
as in LTR modes - so that inherited script characters are always
associated with the preceding run. Otherwise, for a sequence such as
u+0631 u+064d u+0020, it would get split after the first character,
which would lose the ability to correctly position the u+064d mark.

Change-Id: I3c12ba1b77d18334f55e707f518be1046e6b339b
2013-04-23 12:51:27 -07:00
Victoria Lease
cc0f9d8469 use appropriate fallback chain for style
TextLayoutShaper was defaulting to the Regular-style fallback chain
for all unknown scripts. This became problematic in that the
codepoint->glyphID enumeration stage of shaping was always using the
Regular-style fallback chain for unknown scripts, and there's no
guarantee that glyph indices are compatible between fallback chains.

Defaulting to a style-appropriate fallback chain addresses this
issue, and probably unreported but related issues, as well.

Bug: 8189208
Change-Id: I6ecf531c74d71a8e4a5359d23439ccc950b0cf80
2013-04-16 09:51:45 -07:00
Derek Sollenberger
45fa0cbc54 Ensure that a canvas is always backed by some form of SkDevice.
bug: 8518884
Change-Id: Id6c597179878ce5b938c00422e88bef5f12e2e1f
2013-04-09 16:36:55 -04:00
Victoria Lease
626d3c2281 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
2013-03-28 15:56:14 -07:00
Fabrice Di Meglio
665f02c667 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
2013-03-20 14:56:05 -07:00
Fabrice Di Meglio
da12f389eb Revert "Clean Paint.mBidiFlags as it is no longer used"
This reverts commit 6d9fe5bd22b531bfce69b146254a4791c76acddc.
2013-03-15 11:26:56 -07:00
Fabrice Di Meglio
19f46b0d7a Revert "Fix bug #8194572 Chrome SIGBUS'es on launch around TextLayoutCacheKey"
This reverts commit ebcacc785b0883c9435a3e850f790785fba93370.
2013-03-15 11:26:23 -07:00
Fabrice Di Meglio
a4bf8114a7 Revert "fix argument mismatches in Paint JNI"
This reverts commit b61fb10fe435b74a761e82f517abd0320f22193e.
2013-03-15 11:22:29 -07:00
Mathias Agopian
b1d90c8f60 fix JNI use of incStrong/decStrong
Change-Id: Ia11b404dea483dc19bbc30f4d7bcff516655e180
2013-03-06 17:48:20 -08:00
Derek Sollenberger
5b6591c1d0 fix issue when replacement bitmap is larger than original.
getTotalClip() returns the canvas bounds even if no explicit clip
was set. This CL fixes that issue by only transfering clips that
were explicitly set to the new canvas.

bug: 8255582
Change-Id: I0144d430e7718151ad93d988fcf20b412f74b256
2013-02-28 11:18:50 -05:00
Derek Sollenberger
1b63e60abd 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
2013-02-21 14:49:17 -05:00
Mathias Agopian
76f56dd598 am ceec31b7: Merge changes I5a218ca1,I853a76d9
* commit 'ceec31b7dab6a23e443d5dcbcfac4a23b720cfde':
  Refactoring: Rename SurfaceTextureClient to Surface
  clean-up following Surface split
2013-02-15 14:28:22 -08:00
Romain Guy
df93fdb6c0 am aa8307b9: Merge "Remove obsolete header file"
* commit 'aa8307b991b9fca5403b5d7f43659b92527af4fd':
  Remove obsolete header file
2013-02-15 14:28:19 -08:00
Mathias Agopian
ceec31b7da Merge changes I5a218ca1,I853a76d9
* changes:
  Refactoring: Rename SurfaceTextureClient to Surface
  clean-up following Surface split
2013-02-15 22:08:40 +00:00
Mathias Agopian
5280061794 Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: I5a218ca11abeeec05e3a4c3cfc581bcc788814ea
2013-02-15 12:47:40 -08:00
Romain Guy
13ba005484 Remove obsolete header file
We now use the same mechanism to compare keys everywhere in libhwui.

Change-Id: I8b3cb25b13f4f38eb6f12aed0356f796a773617c
2013-02-15 12:47:26 -08:00
Victoria Lease
c85637f0e6 am c69bce2e: Merge "fix argument mismatches in Paint JNI"
# Via Android (Google) Code Review (1) and Victoria Lease (1)
* commit 'c69bce2e41c70da35e1b6a2ab5ec44469ab14c80':
  fix argument mismatches in Paint JNI
2013-02-14 19:59:03 -08:00
Victoria Lease
b61fb10fe4 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
2013-02-14 15:58:46 -08:00
Fabrice Di Meglio
c504c4e51d am 336fcac3: Merge "Fix bug #8194572 Chrome SIGBUS\'es on launch around TextLayoutCacheKey"
# Via Android (Google) Code Review (1) and Fabrice Di Meglio (1)
* commit '336fcac31ddccc7e7a6773d03e7cb17967ebb898':
  Fix bug #8194572 Chrome SIGBUS'es on launch around TextLayoutCacheKey
2013-02-13 17:38:31 -08:00
Fabrice Di Meglio
ebcacc785b Fix bug #8194572 Chrome SIGBUS'es on launch around TextLayoutCacheKey
- remove remaining dirFlags
- clean method names

Change-Id: I404b643cd10321e977530528168d1d415b3f2eca
2013-02-13 17:22:52 -08:00
Chris Craik
c932760f66 Merge "Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE" 2013-02-13 23:14:58 +00:00
Fabrice Di Meglio
0c33ecd209 Merge "Clean Paint.mBidiFlags as it is no longer used" 2013-02-13 19:11:50 +00:00
Chris Craik
7c1a49f5f5 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
2013-02-13 10:50:20 -08:00
Victoria Lease
ded5ed963c Count baseGlyphCount once for scripts without typefaces
Characters from complex scripts without dedicated typefaces were
getting baseGlyphCount counted twice: once in shapeFontRun() and
then a second time during SkScalerContext::getNextContext()
chaining.

This was a problem for text runs beginning with full-width Latn
characters - shapeFontRun() would get the base glyph count for
the typeface containing those characters, then realise it had no
typeface specified for the Latn script, resetting the typeface
to default without resetting the base glyph count along with it.
Mojibake full-width Latn characters, ho!

The same issue also affected Cherokee text, which this fix also
addresses.

Bug: 8127795
Bug: 8034351
Change-Id: I058d81cffbbf86426cc3c5aafcc91a76f4fe6b62
2013-02-12 14:47:43 -08:00
Fabrice Di Meglio
6d9fe5bd22 Clean Paint.mBidiFlags as it is no longer used
See bug #7623824

Change-Id: Ie2f9422821f6dcc73c99e8695f448e966b587b1d
2013-02-12 13:12:13 -08:00
Michael Jurka
7f2e4efa96 am c24b1448: Merge "Don\'t mark recycled bitmaps as immutable"
# Via Android (Google) Code Review (1) and Michael Jurka (1)
* commit 'c24b14481527e2f87ddb3a156b8217d32c645b10':
  Don't mark recycled bitmaps as immutable
2013-02-04 09:35:09 -08:00
Michael Jurka
c24b144815 Merge "Don't mark recycled bitmaps as immutable" 2013-02-04 17:31:17 +00:00
Michael Jurka
afce5a4008 Don't mark recycled bitmaps as immutable
Helps avoid Bitmap allocations in apps that use a
pool of bitmaps and recycle them

Change-Id: I787455a5207bf90d6ed9f1622e0f7f7e1a4a6704
2013-02-04 16:40:25 +01:00
Derek Sollenberger
d0351a67f1 am 1bce2db3: Merge "Fix return type mismatch in Region\'s JNI code."
# Via Android (Google) Code Review (1) and Derek Sollenberger (1)
* commit '1bce2db3b4ac17156066646171c82731c87aa4d1':
  Fix return type mismatch in Region's JNI code.
2013-02-04 05:24:49 -08:00
Derek Sollenberger
250f8ef248 Fix return type mismatch in Region's JNI code.
bug: 7620006
Change-Id: Iddca9b3739b0c116a80a900e06cede338b868e17
2013-02-01 11:57:59 -05:00
Jeff Sharkey
8c02c72475 am 54298652: Merge "Reduce TextLayoutCache logging."
* commit '5429865241f1e63f52fbbcf5d97fcca0ec68e793':
  Reduce TextLayoutCache logging.
2013-01-17 13:00:10 -08:00
Jeff Sharkey
3f32a313db Reduce TextLayoutCache logging.
Change-Id: I09ae49b0a9708de219b18b00ce5b82ee4a0b2bcd
2013-01-17 12:53:27 -08:00
Junichi Monma
7d73eb049f am 6d191ed9: Added the necessary Harfbuzz scripts for rendering Japanese text correctly.
* commit '6d191ed99491f209168e88f3d570e89c6836285b':
  Added the necessary Harfbuzz scripts for rendering Japanese text correctly.
2013-01-17 09:08:30 -08:00
Junichi Monma
6d191ed994 Added the necessary Harfbuzz scripts for rendering Japanese text correctly.
bug id : b/8023135

Change-Id: Ie9a69f480026302ff949fdf2b4089e4d95a38fb0
2013-01-17 16:13:22 +09:00
Kristian Monsen
1893d443eb am 2d76d4f3: Fix build break in master-chromium
* commit '2d76d4f35ca8d0bcb45159555aa7715b7070a751':
  Fix build break in master-chromium
2013-01-15 20:20:08 -08:00
Kristian Monsen
2d76d4f35c Fix build break in master-chromium
Include needed headers and sort them correctly.

Change-Id: I8557c98234d86f4d0b105182f4f191a826c9aeb5
2013-01-15 19:23:21 -08:00
Raph Levien
0728441b93 am e45113a1: Merge "Attempt to resolve build breakage on x86"
* commit 'e45113a1564c6e701fcc076813bee276d501c576':
  Attempt to resolve build breakage on x86
2013-01-15 15:02:51 -08:00
Raph Levien
77b74d4f93 Attempt to resolve build breakage on x86
If the scalblnf function is not available but scalbnf is, this patch
should fix the build.

Change-Id: Id83faba3298a44d57f4c924862a15c5d2bef3ca0
2013-01-15 14:37:27 -08:00
Raph Levien
49a7e454d1 am 7cd0859a: Merge "Update framework text layout to use Harfbuzz NG"
* commit '7cd0859a735c0c6a489d70d5d96e44e9d1a27be8':
  Update framework text layout to use Harfbuzz NG
2013-01-15 11:28:40 -08:00
Raph Levien
aaedde51b7 Update framework text layout to use Harfbuzz NG
These are the frameworks changes to use the new version of Harfbuzz.

Change-Id: Idbef325e8fc1c27a9f2296414ddb1f79b778a00e
2013-01-15 09:58:06 -08:00
Derek Sollenberger
fc615a0f64 Remove calls to SkCanvas::setBitmapDevice()
Change-Id: Ib0aa2f65b77802b105c0e8a9d7cdde2e863d3673
2013-01-08 10:00:54 -05:00
Siva Velusamy
360b4d9418 am af80cdd7: Merge "DdmServer: add controls for OpenGL tracing"
* commit 'af80cdd7dfa28158fa91ab374d8e6d2500de66b1':
  DdmServer: add controls for OpenGL tracing
2013-01-02 09:14:06 -08:00
Siva Velusamy
af80cdd7df Merge "DdmServer: add controls for OpenGL tracing" 2013-01-02 09:10:06 -08:00
Siva Velusamy
0c1761bd37 DdmServer: add controls for OpenGL tracing
Add a new JDWP packet to allow control of OpenGL tracing.

Change-Id: Ic89e2f6299238a612df2f914581049f2cbba088c
2012-12-19 16:31:56 -08:00
Derek Sollenberger
2fa54cef47 Merge "Update framework to support r5967 of Skia." into master-chromium 2012-12-19 06:18:11 -08:00