1198 Commits

Author SHA1 Message Date
Tim Murray
abd5db9d37 Add support and better exceptions for Bitmaps with a null config.
Bug: 8263427
Change-Id: I4181402e4739c6a40591f1e1416fca98643ecc57
2013-02-28 14:33:01 -08:00
Victoria Lease
8e04840f38 round subpixels up to next integer in measureText DO NOT MERGE
A common source of layout bugs we're seeing these days involves the
output of measureText() being fed into StaticLayout's constructor.
measureText() returns subpixel-accurate values, but StaticLayout only
takes integral bounds, resulting in the subpixel portion of the
bounds being truncated. This leaves StaticLayout with insufficient
space to layout the text that was just measured, causing all manner
of unexpected line breaks.

This could be causing issues elsewhere, as well. Until our text
pipeline is fully subpixel-perfect, it's best that measureText
guarantee that the value it returns will be sufficient to contain
the text, even if cast to int.

Cherry-pick of Ib84947f0d0a1229287f5b19b99e7efd40f5317f7

Bug: 8164205
Change-Id: I69795ba5770112c0a3d0e752158076a8d1646b1a
2013-02-27 11:38:05 -08:00
Jason Sams
add26dca07 add support for debug and profile contexts.
Change-Id: I759e54e365a344a93d725eb4fa70a2c4c98bf05a
2013-02-22 18:43:45 -08:00
Jason Sams
fa5cb40793 Merge "Fix build break." 2013-02-22 21:59:19 +00:00
Jason Sams
c089c2fc00 Fix build break.
Change-Id: I362c96787482bc8daee7dd4a01817ab7ed79b730
2013-02-22 13:57:36 -08:00
Jason Sams
ec39a94ac2 Merge "Implement USAGE_IO_INPUT" 2013-02-22 21:35:12 +00:00
Jason Sams
72226e0543 Implement USAGE_IO_INPUT
Change-Id: Id5b9e3d0a17e4df15eec36d542fde6dc626138b2
2013-02-22 12:45:54 -08: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
Chris Craik
c4ca87f0f4 am 8a47d8ea: Merge "Clean up clipping and deferral logic"
* commit '8a47d8eaec26d0937aee94a057f561f246748339':
  Clean up clipping and deferral logic
2013-02-20 10:42:40 -08:00
Chris Craik
5d11676414 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
2013-02-19 18:56:10 -08:00
Jason Sams
ece85f3b04 am 840b5069: Merge "Support typed YUV allocations."
* commit '840b5069707c6f39ec06231dacbcbe8159d581c1':
  Support typed YUV allocations.
2013-02-15 18:59:22 -08:00
Jason Sams
840b506970 Merge "Support typed YUV allocations." 2013-02-16 02:54:22 +00:00
Tim Murray
5db25eda73 am ab7a2919: Merge "Add MIRRORED_REPEAT."
* commit 'ab7a2919a321af21b234d8db14748624c1b13634':
  Add MIRRORED_REPEAT.
2013-02-15 18:15:40 -08:00
Tim Murray
ab7a2919a3 Merge "Add MIRRORED_REPEAT." 2013-02-16 02:11:32 +00:00
Jason Sams
dd6c8b34f1 Support typed YUV allocations.
Change-Id: I56e7a318dc979f0b7454fcfa5773ea6d95bbaeaa
2013-02-15 17:27:24 -08:00
Tim Murray
6b9b2caf2b Add MIRRORED_REPEAT.
Change-Id: I7565da24912a3c33d8f824da9ea0899a423d3c40
2013-02-15 14:53:09 -08: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
Mathias Agopian
5280061794 Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: I5a218ca11abeeec05e3a4c3cfc581bcc788814ea
2013-02-15 12:47:40 -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
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
Stephen Hines
9b10e27d60 Merge "Add rsnScriptForEachClipped() implementation with no param array." 2013-02-13 23:06:34 +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
Stephen Hines
dac6ed0b69 Add rsnScriptForEachClipped() implementation with no param array.
JNI doesn't let us pass down a NULL parameter array (from the usrData part
of our reflection). In this case, we simply clone our existing function, but
remove the offending array parameter.

Change-Id: Ib1d6e202f2a55ba8922eec3da5a93d8daa882250
2013-02-13 00:09:02 -08:00
Tim Murray
43aed48fac Merge "Pass through null LaunchOption structs to standard forEach." 2013-02-13 00:42:37 +00:00
Tim Murray
ba9dd06176 Pass through null LaunchOption structs to standard forEach.
Change-Id: I4dcde6996400207c7e361ff4b7723ec7db832e80
2013-02-12 16:23:19 -08:00
Stephen Hines
aa5d5b1931 Merge "Check Element in all API levels for copy2DRangeFrom()." 2013-02-12 22:47:47 +00:00
Stephen Hines
004158032a Merge "Fix copyFrom() to use proper dimensions for copying." 2013-02-12 22:45:00 +00:00
Jason Sams
d25d037890 Merge "Add FieldPacker contructor that accepts external storage." 2013-02-12 22:22:10 +00: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
Stephen Hines
5f528becb0 Check Element in all API levels for copy2DRangeFrom().
Change-Id: I561317671a16888fc9f35908ab1ae1489a14fc6c
2013-02-08 21:03:51 -08:00
Stephen Hines
a9a7b37405 Fix copyFrom() to use proper dimensions for copying.
This change actually fixes several bugs related to stride:

* copyFrom() needs to call the 2D or 1D version, depending on the dimensions
  of the corresponding Allocation.
* Add an internal-only copy2DRangeFromUnchecked(), since we don't really
  want to expose it as another public API (only via copyFromUnchecked()).
* Call the proper 1D/2D version in copyFromUnchecked() based on the
  Allocation dimensions.
* Add Element checks to the "checked" copy2DRangeFrom() routines.

Change-Id: I690706d36884ee749bf90937c715855f6c07368c
2013-02-08 20:56:00 -08:00
Romain Guy
97dcc20e6d Merge "Deprecate useless BitmapDrawable constructor Bug #2590549" 2013-02-08 22:01:05 +00:00
Romain Guy
7ac40e3869 Deprecate useless BitmapDrawable constructor
Bug #2590549

Change-Id: Icb45bf2d9836c43ed0825105f64d7b98afcdcdac
2013-02-08 14:00:15 -08:00
Jason Sams
5b08a2dc78 Add FieldPacker contructor that accepts
external storage.

Change-Id: I9c796f925802b202eae7e0fe1750a10140ef4a47
2013-02-08 11:22:17 -08:00
Tim Murray
eb8c29cb7e Add API entry points for clipped kernels.
Change-Id: Idf474a5ac391c41e9215cd2f03e7f8c4bfb875fa
2013-02-07 15:22:36 -08:00
Jason Sams
3c6721899e Merge "Implement rs.sendMessage()" 2013-02-07 02:17:53 +00:00
Scott Main
e68c1ce1d4 am 11f1c5b8: am b3a57191: am 0a00de11: am 805d2e2d: am 00f49084: Merge "docs: fix renderscript links that currently require redirect" into jb-mr1-dev
# Via Android Git Automerger (4) and others
* commit '11f1c5b89a98cb6794f2b1f158b8c22e38af975f':
  docs: fix renderscript links that currently require redirect
2013-02-06 12:31:26 -08:00
Scott Main
11f1c5b89a am b3a57191: am 0a00de11: am 805d2e2d: am 00f49084: Merge "docs: fix renderscript links that currently require redirect" into jb-mr1-dev
# Via Android Git Automerger (3) and others
* commit 'b3a57191e62e0c394ba4a3448770853a1fb7ac3b':
  docs: fix renderscript links that currently require redirect
2013-02-06 12:26:46 -08:00
Scott Main
805d2e2d98 am 00f49084: Merge "docs: fix renderscript links that currently require redirect" into jb-mr1-dev
# Via Android (Google) Code Review (1) and Scott Main (1)
* commit '00f490844d89b146e5490204a5a483834950c489':
  docs: fix renderscript links that currently require redirect
2013-02-06 12:19:30 -08:00
Derek Sollenberger
23e500d168 Merge "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" 2013-02-06 12:57:38 +00:00
Jason Sams
455d644266 Implement rs.sendMessage()
Change-Id: Ib4f4bb7bb4f697d0b5405ad55721394ed2456c65
2013-02-05 19:20:18 -08:00
Jason Sams
a4b7bc9786 Log non-fatal RS errors.
Change-Id: I3e58b89453af8955ba9df825ec143e793890f44a
2013-02-05 15:05:39 -08:00
Scott Main
b47fa1699a docs: fix renderscript links that currently require redirect
Change-Id: Ie12ff2c4be5ca22ac43dfe3a16868c7bef8e4ae8
2013-02-05 14:23: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