237 Commits

Author SHA1 Message Date
Fabrice Di Meglio
c2063a5b18 Fix bug #5037425 Canvas.drawText can't handle Right-to-Left text and text composing
- optimization for single run case was broken
- pass isRTL boolean along the call stack instead of the dirFlags integer
  (which was only used as a "isRTL" in the shaper)
- update unit tests

Change-Id: I33110b76a433633a0b92fbd1db03785204e0c3e6
2011-07-18 17:47:04 -07:00
Fabrice Di Meglio
796cc96243 Clean test APIs for Harfbuzz support
- also update unit tests

Change-Id: I557f61e84c4c4b6165163b783d9c679a6b3b4106
2011-07-15 17:49:22 -07:00
Romain Guy
99b7b7a7f8 Force bitmaps to load in ARGB8888 by default.
Bug #5024993

Change-Id: Id0c63f675ae188e5a786b7fdd63916e114b9ed4a
2011-07-14 12:42:19 -07:00
Jamie Gennis
3cf7cf5751 Merge changes I9fb59763,I8b2c6e00
* changes:
  SurfaceTexture: consume buffers after err checks
  SurfaceTexture: change onFrameAvailable behavior
2011-06-28 12:55:03 -07:00
Jamie Gennis
bd5404d031 SurfaceTexture: change onFrameAvailable behavior
This change alters the conditions under which the onFrameAvailable
callback gets called by the C++ SurfaceTexture class.  The new behavior
is to call the callback whenever a frame gets queued that will be
visible to the buffer consumer.  This means that buffers queued in
synchronous mode always trigger the callback, as those buffers will
remain pending until they are consumed.  Buffers queued in asynchronous
mode will only trigger the callback if there was not previously an
unconsumed buffer pending.

The new behavior means that a consumer should perform a draw operation
exactly once for every onFrameAvailable call that it recieves.  This
change also modifies SurfaceFlinger and the SurfaceTexture JNI to
support of the new behavior.

Change-Id: I8b2c6e00961d3d58b11c6af50b555b6e4c5f5b40
2011-06-27 15:45:39 -07:00
Jean-Baptiste Queru
a2c8a7b573 am ec5039b3: am 99c070d8: am 4fea5373: Merge "Add WEBP to the list of Image formats that support Compression."
* commit 'ec5039b3720ee9b92fb2a2c6dd9f468d2dcd7172':
  Add WEBP to the list of Image formats that support Compression.
2011-06-27 14:15:01 -07:00
Jamie Gennis
436b50f0dc Merge "SurfaceTexture: detach from Dalvik when necessary." 2011-06-26 12:23:12 -07:00
Jean-Baptiste Queru
ec5039b372 am 99c070d8: am 4fea5373: Merge "Add WEBP to the list of Image formats that support Compression."
* commit '99c070d8eb9f1ff9ea5c38991f15f091040226c2':
  Add WEBP to the list of Image formats that support Compression.
2011-06-24 12:20:24 -07:00
Fabrice Di Meglio
d3d4b4b86a Merge "Fix potential advances overrun in TextLayoutCache." 2011-06-24 12:02:58 -07:00
Doug Felt
b092f55c37 Fix potential advances overrun in TextLayoutCache.
Change-Id: Ibec544f249833a28fe8ef9a15fc8ab48fddfc51c
2011-06-24 11:54:00 -07:00
Grace Kloba
0904d0af81 Add allowSynchronousMode to SurfaceTexture constructor.
Change-Id: I54f30a3c16bbe6b813f3bcd1d389da5627531304
2011-06-23 21:21:47 -07:00
Jamie Gennis
0a8fd9b610 SurfaceTexture: detach from Dalvik when necessary.
This change adds a call to detach from the Davlik VM in SurfaceTexture
JNI calls that caused an attach.

Change-Id: I8e0d7d596680bd25ac42f8db4ca8343a62827255
2011-06-23 15:12:16 -07:00
tedbo
0694cfe49a Merge "Add method to create a ParcelSurfaceTexture from android.view.Surface." 2011-06-23 14:45:30 -07:00
Vikas Arora
2305ac9e4a Add WEBP to the list of Image formats that support Compression.
Note: The integrator of this change to Android internal code-repo will
have to run one extra step 'make update-api' to update 'api/current.txt'
file corresponding to approved API. The AOSP branch didn't have this
file, hence I could not add the same to this change. The updated file
'api/current.txt' has to be submitted along with this change.

Change-Id: I29909e907a2e82d801e16654322190a808c5bda9
2011-06-23 13:11:13 +05:30
tedbo
4e8a5c922c Add method to create a ParcelSurfaceTexture from android.view.Surface.
Change-Id: I05e343ab7e327478f60322af9373574b70c148f5
2011-06-22 16:18:09 -07:00
Grace Kloba
925bcaabde Fix the issue where onFrameAvailable is not triggered if SurfaceTexture is in sync mode.
If there is more frame after updateTexImage, trigger the listener again.

Change-Id: I1415ae9a914cc8bb139cb369464b1f6a2aa24058
2011-06-22 00:56:54 -07:00
Jamie Gennis
84293fb962 SurfaceTexture: attach to Dalvik when needed.
This change fixes a bug in the SurfaceTexture JNI where a thread that
the Dalvik VM was not aware of calls the onFrameAvailable callback.
When this happens the callback needs to first attach the thread to the
VM before attempting to post the onFrameAvailable event for Java code to
handle.

Change-Id: I6a5470c32611ea6f38e9167779450f50635cabd3
2011-06-17 16:42:46 -07:00
Derek Sollenberger
f11c52d246 Updates resulting from the Skia merge (revision 1327)
Change-Id: I1d2cecbad6c30e6ebc9579093404742f17e14e84
2011-06-13 15:07:30 -07:00
tedbo
cc5278a3e2 Support for setting a ParcelSurfaceTexture as the MediaPlayer sink.
This adds support for setting a SurfaceTexture as the MediaPlayer video
sink by using a ParcelSurfaceTexture object. The goal is to enable a
SurfaceTexture to pass through Binder (via ParcelSurfaceTexture) and then
be set on the MediaPlayer.

Change-Id: Ife5689ce673eb4bee1c377019db761685217b71d
2011-06-13 14:27:39 -07:00
tedbo
050316184b Add ParcelSurfaceTexture Java class to enable ISurfaceTexture sharing via Binder.
This adds a new ParcelSurfaceTexture.java class that can be instantiated with
a SurfaceTexture and used to send the corresponding ISurfaceTexture interface
to another process via Binder. The ParcelSurfaceTexture java object can then
be used to create an ANativeWindow based on the SurfaceTextureClient interface.

Change-Id: Ie38ea948b866e52f36a6d0f6cde19b54a8546817
2011-06-09 11:59:23 -07:00
Jean-Baptiste Queru
de26719153 Tweak setViewport stuff for fwd-compat
Change-Id: I532336eced54544115dfd47d5557cc77bafdfc87
2011-06-08 13:00:58 -07:00
Fabrice Di Meglio
af033caf26 Fix USE_TEXT_LAYOUT_CACHE define
- fix compilation issues

Change-Id: I3358457d94d2278804e81e4ca96c9633ed76a147
2011-06-06 11:51:46 -07:00
Marco Nelissen
9743547cde Fix crash when nesting Picture recording.
b/4490619, http://code.google.com/p/android/issues/detail?id=16644

Change-Id: Ia227c87cba61e0d0b6f86b01a064a3eefe447fe1
2011-05-31 10:23:41 -07:00
Fabrice Di Meglio
41701ac5f6 Merge "Fix bug #4441002 Crash in SkPathEffectGlue::OneD_constructor" 2011-05-18 12:50:34 -07:00
Fabrice Di Meglio
78b868ff42 Fix bug #4441002 Crash in SkPathEffectGlue::OneD_constructor
- take care of empty strings in TextLayoutCache when computing advances/glyphs with Harfbuzz

Change-Id: I8eb5f632feb7a86e5c4a6db03d073c4b7d859dbc
2011-05-17 19:56:20 -07:00
Derek Sollenberger
43124d2214 Merge "Updates resulting from the Skia merge (revision 1327)" 2011-05-17 04:55:56 -07:00
Derek Sollenberger
d39d1affe8 Updates resulting from the Skia merge (revision 1327)
Change-Id: I2a8f5869dbe95bb594f2ba5d7278f9b330e6f17a
2011-05-16 15:30:40 -04:00
Fabrice Di Meglio
35844a3a4e Merge "Fix bug #4415576 Gmail text looks broken" 2011-05-16 11:00:02 -07:00
Fabrice Di Meglio
8fb507171f Fix bug #4415576 Gmail text looks broken
- pass correct "contextCount" when needed

Change-Id: I56ebd9486e99e6ca5a3973ec403cf1ced874b4c3
2011-05-13 18:58:59 -07:00
Fabrice Di Meglio
2ea7588014 Prepare OpenGLRenderer to use glyphs from TextLayoutCache
- add OpenGLRenderer.drawGlyph()
- refactor glypth logging code

Change-Id: I797e6f1304d3f3f8f6ed31e7f9965d336233d2a4
2011-05-13 11:07:38 -07:00
Jean-Baptiste Queru
b0ca8b9dfd am a84d29cb: am 6714e677: Merge "Ninepatch tweaks for better interop"
* commit 'a84d29cb0494310e9472884c7a459603eb305e38':
  Ninepatch tweaks for better interop
2011-05-12 15:52:16 -07:00
Derek Sollenberger
0ceb9501b2 Adapt to latest skia
Change-Id: I39247db04ca8b7993b0f5a16fb0324828d04cc3a
2011-05-12 15:05:44 -07:00
Jean-Baptiste Queru
9faa34e603 Ninepatch tweaks for better interop
Change-Id: I96781e2b27fcd6dd05d9726829e8e79ff365cbdc
2011-05-12 14:22:43 -07:00
Jean-Baptiste Queru
c9e22e9aff Switch to SkSafeUnref for better portability
Change-Id: Ia146a4728b5eb92626462effe42521ca73454a7d
2011-05-12 08:22:35 -07:00
Conley Owens
e7cb25916c am 1eb31b43: am 718516f3: am 9fd8e057: Merge "Fix memory leak of SkMovie class"
* commit '1eb31b434fdc325c55b65ecf1783c63b2fdfa669':
  Fix memory leak of SkMovie class
2011-05-02 10:11:52 -07:00
Conley Owens
1eb31b434f am 718516f3: am 9fd8e057: Merge "Fix memory leak of SkMovie class"
* commit '718516f3b73468c480ef8d2283a1c80a6223658d':
  Fix memory leak of SkMovie class
2011-04-29 17:15:09 -07:00
Romain Guy
8f67eae87a Take the index parameter into account in drawTextOnPath.
Change-Id: I92ff9b2c0fe16a467996ae1973bbfd4fad5ef750
2011-04-26 11:24:42 -07:00
Fabrice Di Meglio
589e4e27ee Fix bug #4338103 (Android Arabic and Hebrew input is broken)
- fix glyph order when there is only a single run
- update tests

Change-Id: I113f28a8c76cab622fb75ce84bc50d1d38fa254e
2011-04-25 17:48:55 -07:00
Fabrice Di Meglio
0a1413e4bf 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
2011-04-21 17:36:26 -07:00
Fabrice Di Meglio
010d5c4e5b TextLayout cache - update size and improve logging
- set size to 256K
- add pid logging
- fix percent gain computation

Change-Id: Id6da4d606147294e05597022414531c346860f45
2011-04-21 15:33:50 -07:00
Fabrice Di Meglio
4f810c8535 Use Harfbuzz for Paint drawText / measureText / breakText APIs
Change-Id: I35aa02bfd45629bf5c560f98a28399ff3d0fc900
2011-04-19 17:36:13 -07:00
Fabrice Di Meglio
b39d89735b Use Harfbuzz for Canvas drawText APIs
Change-Id: I661d5e9e0bbe9a859e7a000cb161994d29add099
2011-04-18 18:33:48 -07:00
Fabrice Di Meglio
06732fde78 Return chars advances instead of glyphs advances
- take care of log_clusters for char/glyph mapping
- remove verbose logs

Change-Id: Id19af2b4a46cc4ada0b99263a3208de14a979ba5
2011-04-18 17:00:18 -07:00
Fabrice Di Meglio
f7b9e78486 Merge "Add Unicode BiDi Algo before drawing text in Canvas" 2011-04-18 11:15:57 -07:00
Fabrice Di Meglio
689e515ed2 Add Unicode BiDi Algo before drawing text in Canvas
- only for temporary API
- update BiDiTest

Change-Id: Ifd445799dc0fda4da896246e41978cd8d71aa035
2011-04-15 19:39:47 -07:00
Elliott Hughes
e9cf71dfd0 Merge "Don't allocate a raw object then call its constructor manually..." 2011-04-13 10:17:46 -07:00
Elliott Hughes
cf6f7a0f00 Don't allocate a raw object then call its constructor manually...
We can do this in one step.

Change-Id: Id6b70c83002038caf62fe89cc769eca54ae0c055
2011-04-12 17:50:45 -07:00
Elliott Hughes
4cb1753ec6 Remove useless forward declarations.
Change-Id: I8f191367acb18ea9a3f807e791099e0485b1b249
2011-04-12 16:10:26 -07:00
Elliott Hughes
dd66bcbf9d More native code cleanup.
Don't keep unused global references to classes, don't throw exceptions
when an exception is already pending, and fix a (harmless) misunderstanding
about how GetStringChars works.

Change-Id: Ie445036f057daa8a1c76aceb7bad2a84fb81d820
2011-04-12 11:28:59 -07:00
Elliott Hughes
a3804cf77f You don't need to poke around inside FileDescriptor manually.
We can help you with that.

Note also that getParcelFileDescriptorFD did no such thing. All its callers
were passing in a regular java.io.FileDescriptor and expecting the int. No
ParcelFileDescriptors involved.

Change-Id: Idc233626f20c092e719f152562601f406cc1b64a
2011-04-11 17:04:01 -07:00