294 Commits

Author SHA1 Message Date
Jason Sams
020bb7b5ac Add skip to field packer.
remove hsb functions from env headers.
add RS_PACKED define for packed structures.

Change-Id: Idc661edff85c0047baa201f43e0839ac82c74593
2010-06-17 15:55:00 -07:00
Romain Guy
d4824c256c Merge "Add new API to check whether a Bitmap was modified." 2010-06-15 18:06:47 -07:00
Romain Guy
0bbae08364 Add new API to check whether a Bitmap was modified.
Bitmap.getGenerationId() can be used by caches to find out if a Bitmap has been
modified. This simply exposes an existing Skia API.

This change also adds a small test app for Canvas hardware acceleration. The new
Bitmap API is required to implement a texture cache.

Change-Id: I8547b146cd14c8afe1a2327fcd6d71b1b1cb68fc
2010-06-15 18:03:40 -07:00
Jason Sams
96ed4cfa62 Remove InvokeData and add ContextFinish to generate a sync point.
Change-Id: I27da8bf5fba2c8a428964cb6a5e66dd7a94958d8
2010-06-15 12:15:57 -07:00
Doug Felt
0c702b88c5 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
2010-06-10 14:03:22 -07:00
Romain Guy
2d6145993e Move OpenGL support out of ViewRoot into a new HardwareRenderer class.
Change-Id: Iffaed924a5defc3c4df26223c390dc27eee115b1
2010-06-09 18:27:08 -07:00
Jason Sams
cbe4a73fef Merge "Begin using reflected files." 2010-06-08 15:43:57 -07:00
Jason Sams
e29f3e74f7 Begin using reflected files.
Change-Id: I5307a0eac9c206b85c0cf7451d3f8300134bf8e3
2010-06-08 15:40:48 -07:00
The Android Open Source Project
d994dcbd81 am cefdedc3: merge from froyo-plus-aosp 2010-06-07 16:45:04 -07:00
The Android Open Source Project
cefdedc369 merge from froyo-plus-aosp
Change-Id: I58f1d905b3fa781e4f5827d4d7b9323a4cdcc04e
2010-06-07 16:42:09 -07:00
The Android Open Source Project
c1038e778f merge from open-source master
Change-Id: I1a36964a723bce72139f1bc2402520b7f8d5e47b
2010-06-07 16:37:22 -07:00
Alex Sakhartchouk
aae74ad614 Creating the jni and java layer to integrate a3d
Change-Id: I438359633bae59bf9188cd2c4664a92ca16c5f37
2010-06-04 10:06:50 -07:00
Erik Faye-Lund
92ce5734b5 Canvas.drawVertices: correct color range-check
The range-check in drawVertices previously checked that the color
count was equal to the vertex count. However, the vertex count is
specified in array elements, and there's two array elements per
vertex for the positions, but only one array element per vertex
for the colors.

Correct the code so the check is consistent with the element count.

Change-Id: Id043f1003f9245f18adc91bac49dc33727ca765e
2010-06-02 23:47:01 +02:00
Jason Sams
8cb39de03a Remove RS_KIND from vertex arrays types.
Legacy vertex programs now bind by name just like the user programs.
This removes the need for two different ways of declairing the same
information.

Change-Id: I0178c0962842a1bbffb6726984ae1b8f5bb7529c
2010-06-01 15:47:01 -07:00
Jason Sams
d79b2e9f8b Begin naming cleanup for renderscript runtime.
Prefix functions with "rs" or "rsg".

Change-Id: I4435b486831bfab1ea473ccfad435b404e68f1c9
2010-05-19 17:23:08 -07:00
Jason Sams
1de0b87168 Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.
Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
2010-05-17 14:55:34 -07:00
Jason Sams
ec67275e5f Delete legacy setDefine API.
Change-Id: I1bae13533ab9efea3d3b0ebb6a3711343e922f8a
2010-05-14 16:51:22 -07:00
Jason Sams
b42315d37a Delete old createFromClass methods.
It no longer makes sense to create type info from Java since this
cannot be exported to scripts.  The new flow is in the opposite direction.

Change-Id: I9b46e3f57abf84c01326bd9b9b834f3ff0f7c504
2010-05-14 16:29:20 -07:00
Jason Sams
54db59c359 Rename ProgramFragmentStore to ProgramStore.
Change-Id: Ia8ad9ac856944838ced38a2f1e8f07387050bdfd
2010-05-13 18:35:01 -07:00
Doug Felt
f47d7405bb Modify Canvas drawText to run bidi and shape.
Adds drawTextRun as internal API on Canvas and GraphicsOperations.
Adds implementation to implementors of GraphicsOperations.

Adds state and API on Paint to control the bidi algorithm when used
by Canvas.  This API is currently hidden.

The drawText changes are incomplete since shaping is not yet available
in the native code.

Change-Id: I4368048aef9545df0953a349381771603e04b619
2010-05-12 18:50:02 -07:00
Jason Sams
4d3399337d Convert renderscript from using ACC to LLVM for its compiler.
This will also require application to be updated to support
the new compiler and data passing models.

Change-Id: If078e3a5148af395ba1b936169a407d8c3ad727f
2010-05-11 14:03:58 -07:00
Romain Guy
6430c943f9 Set a layered drawable's child callback to be the container.
Change-Id: I959ad03883931d727d464f384073926e8fa9e2d2
2010-05-06 18:07:40 -07:00
Romain Guy
79a63f7ddb Make sure that a drawable replacing a layer in a LayerDrawable gets a callback.
Change-Id: Iefac7d280b3c16e05f45688da655e17e21a3098b
2010-05-06 17:58:17 -07:00
Peter Eliasson
417675cab0 Improved error handling when font loading fails.
Without this patch, an application could trigger a platform crash
by calling:

  Typeface typeface = Typeface.createFromFile("");
  boolean isbold = typeface.isBold();

The crash occurs since the Skia error that occurs when font loading
fails is not propagated.
With this patch, the Typeface constructor throws an
IllegalStateException when Skia fails to load the font (i.e. when
the native instance is null).

Change-Id: I1002b37b7b32840cb7eeef6819d2982cb18c9003
2010-04-26 12:32:40 +02:00
Mike Reed
d404d6f162 update dox for FILL_AND_STROKE style
Change-Id: I7835068a376dfa4d8c18d8bb20d97941a058e89f
http://b/issue?id=2590047
2010-04-14 14:46:46 -04:00
Mathias Agopian
f221b6324d am e73a100f: am 445a9785: Merge "don\'t hardcode "mSurface" throughout our source code" into kraken 2010-04-13 10:37:55 -07:00
Gilles Debunne
1e91b3fde0 Added documentation in Drawable.
Documentation on the ConstantState added.
Removed all warnings in Eclipse.

Change-Id: Ib1daf7eef1aff5660e805483f9dcae6fcd5a595e
2010-04-12 17:09:14 -07:00
Mathias Agopian
8b138323d5 don't hardcode "mSurface" throughout our source code
this is used in a few places to get access to the android.view.Surface
native surface. use a macro instead. Also rename the field to mNativeSurface.

Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
2010-04-12 16:29:36 -07:00
Gilles Debunne
20fc9bfe3a Fixed links in MipmapDrawable documentation.
Fix for 78aaa97b77d56e35e994611406deb398eb9005db

Change-Id: I3b4a3b987560d5d3934776cdc7ae98c954bfab32
2010-04-12 15:33:49 -07:00
Gilles Debunne
78aaa97b77 New MipmapDrawable class.
This Drawable holds different scaled version of a Drawable and use the appropriate one
depending on its actual bounds to minimize scaling artifacts.

Change-Id: I4ced045d73c1ddd8982d9aaf39c3599b3ac58a16
2010-04-12 11:12:32 -07:00
Romain Guy
bb2890d40b Add Overlay mode to the PorterDuff list of supported modes.
Change-Id: I2ec03b9a1039db3e3c16786222e4fde4782ed67e
2010-04-02 15:48:46 -07:00
Brett Chabot
a0df17ae58 am fad2eca2: am 16d77b8d: am c162668e: Merge "More framework tests cleanup." into froyo 2010-04-01 23:49:07 -07:00
Brett Chabot
16d77b8d42 am c162668e: Merge "More framework tests cleanup." into froyo
Merge commit 'c162668e870cda9d336741f24c177cd925fef8e0' into froyo-plus-aosp

* commit 'c162668e870cda9d336741f24c177cd925fef8e0':
  More framework tests cleanup.
2010-04-01 21:50:00 -07:00
Brett Chabot
0dc59e78e1 More framework tests cleanup.
Move all tests for android.* classes from tests/AndroidTests and
tests/CoreTests into framework/base/<core|graphics>/tests.

Consolidate all tests for java.* classes to tests/CoreTests.
Eventually hopefully these will be moved to dalvik/ somewhere.

Remove tests/AndroidTests entirely.

Change-Id: I86584d086ab7bd045bb38a10b699907805298a95
2010-04-01 18:31:11 -07:00
The Android Open Source Project
b7248b7b81 merge from open-source master
Change-Id: Iad50c5ab4915d0868b3f79ea6ba0d657a6f98525
2010-03-30 11:13:47 -07:00
The Android Open Source Project
758e8d1d1d am 2438894d: am 5849606d: merge from open-source master 2010-03-29 11:21:39 -07:00
The Android Open Source Project
5849606df7 merge from open-source master
Change-Id: I6a7542e696e69bc8788f3b3b77fcec50512ba81c
2010-03-29 11:04:30 -07:00
David Hoover
5f3445dc60 Fix typos in comment.
Change-Id: Ia2a9ea0802bcc5773bb4fd52d7e07f9492242bfd
2010-03-28 08:49:49 -07:00
Jason Sams
2d71bc7b4c Update Script java classes and llvm samples.
Change-Id: I05c8d63fcca095d4fea6abb1ff5736ab9d78a3e6
2010-03-26 16:08:09 -07:00
Jason Sams
a70f416c9c Checkin new types for RS.
Change-Id: I3d7a1a91c45cc1c97c60f3615f32e54e98e12f91
2010-03-26 15:34:30 -07:00
The Android Open Source Project
8e10a7b7c8 merge from open-source master
Change-Id: I4d8f34986fd9e16ead8a22909263069dbb819d3e
2010-03-25 16:39:32 -07:00
Mike Reed
54900e8c05 update dox that we ignore the exact parameter on computeBounds
Change-Id: I6051210ea2a73b4d1c6cd631a285209ab130b4e5
2010-03-25 14:02:40 -04:00
viral.vkm
1be46d7920 setCornerRadii should be called when either of corners radius is specified
as 0dp and thus while checking for condition, it should be ORed and not ANDed.

It solves Android Issue: 939
http://code.google.com/p/android/issues/detail?id=939

Change-Id: Ic18fae769480972f763f634e7462c6ed3853220b
2010-03-25 17:50:57 +05:30
Romain Guy
a8551b1efa Fix the build.
Change-Id: I0caef1fd522d231d803e0fd9e0b8fdf3272db168
2010-03-10 22:11:50 -08:00
Mike Reed
76d1e01d5e hidden api sameAs() to compare the pixels of 2 bitmaps for equality 2010-03-08 08:53:23 -05:00
Jason Sams
8a64743f37 Add support for linking to a skia bitmap rather than always copying the data from the bitmap. 2010-03-01 15:31:04 -08:00
Jason Sams
c2908e60c9 Support defered generation of mipmaps. With this change we support mipmap generation when the texture is uploaded to GL without requiring RS to retain the full chain. 2010-02-23 17:44:28 -08:00
Mathias Agopian
a696f5d667 Add ImageFormat.java and move the Camera/YUV constants from PixelFormat to it.
PixelFormat's corresponding constansts are now deprecated.
2010-02-18 15:32:47 -08:00
Mike Reed
35d2621b3a Merge "update dox" 2010-02-18 06:11:39 -08:00
Jeff Sharkey
2b95c24138 Added more @RemotableViewMethod methods, mutate ImageView.
Catch some View methods missed during the first pass of
marking with @RemotableViewMethod annotation.  Also adds new
ImageView.setColorFilter(int) to match the android:tint XML
attribute.

When ImageView touches ColorFilter or alpha, mutate the
underlying Drawable. Fix NPE in StateListDrawable.mutate().
2010-02-17 15:03:32 -08:00