310 Commits

Author SHA1 Message Date
Jason Sams
f26d01a7ce Merge "Add boolean support for setVar." 2010-07-07 18:52:03 -07:00
Romain Guy
deba785f12 Add support to draw 9patches in OpenGL.
This change only adds the necessary API and stubs. The implementation
will be added in another change.

Change-Id: Ie50b8aff5868e78796cee331df15bdbf990d2ea1
2010-07-07 17:55:03 -07:00
Jason Sams
0b9a22cf78 Add boolean support for setVar.
Change-Id: Id64f3b2e43e19fc2a2d5fd81bb98d9ca67aae843
2010-07-07 17:08:07 -07:00
Doug Felt
4beb8ff717 Support bidi layout for drawTextOnPath.
Change-Id: Ie5867fdb66fe15336774e20d65fa63e0d05bf6fe
2010-07-07 14:58:03 -07:00
Alex Sakhartchouk
8287a9bc5e Cleanup pass on the mesh api change.
Removed all the simple mesh related calls and temporary objects.

Change-Id: Ic64a72a894e0314f216f10e1cfc0d45b17e2e182
2010-07-02 12:14:26 -07:00
Alex Sakhartchouk
164aaedf7f Start of mesh API cleanup.
Switched all native code to go through Mesh class.
Removed SimpleMesh
Added java Mesh class
Will need to port all existing code to use java Mesh, then remove java SimpleMesh.

Change-Id: Idb9c03d0b06b4ef87db28dffcffa1881d39120e5
2010-07-01 16:14:12 -07:00
Romain Guy
ce0537b800 Add hooks for drawBitmap().
Change-Id: I58e962c3a8b2bc75c2605fe369ad3002579d86e0

Add texture cache.

Change-Id: I1c0e5581d228869e114438258a1014e33e024ad7
2010-06-30 15:21:01 -07:00
Romain Guy
c7d53494f1 Implement quickReject() and drawRect().
The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's
something on screen now.

Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
2010-06-25 13:41:57 -07:00
Alex Sakhartchouk
9b949fce39 Adding freetype font rendering to renderscript.
Change-Id: I3a10ffe27092a41df156341c9cb3f7aa19c49f19
2010-06-24 17:15:34 -07:00
Jason Sams
8f31bd6b68 Merge "Add matrix ops to RSH headers." 2010-06-24 14:51:28 -07:00
Jason Sams
fae3f6b415 Add matrix ops to RSH headers.
Change-Id: I7e2843983a12e0155114b4a18813799e4341d26f
2010-06-24 13:54:11 -07:00
Romain Guy
f6a11b8a9e Add support for transformations.
This change adds partial support for the following transforms:
- scale()
- translate()
- rotate()
- setMatrix()
- getMatrix()

The transform is stored in a snapshot and saved/restored as needed.
The transform is currently not applied to the clip rect and is not
mapped to the vertex shader.

Change-Id: Id48993453311200804149917d0c126a4d0471226
2010-06-23 17:47:49 -07:00
Gilles Debunne
03f0292744 New XmlDocumentProvider class.
Minor changes in the Adapters.java helper class.

Extracts data out of a XML document using an XPath-like syntax.

Change-Id: I0617b0783f11c86118b42cd8485d54440810c805
2010-06-23 10:43:00 -07:00
Romain Guy
85bf02fc16 Fix the simulator build.
Change-Id: Ie404f7c2c308f0657f273af19a56e8c039b61898
2010-06-22 13:11:24 -07:00
Jason Sams
9e2b0c505a Fix build error.
Change-Id: Ife0ec056c33654a56f270a5673f614820cfc2e29
2010-06-21 18:30:02 -07:00
Jason Sams
f110d4b787 Move ImageProcessing and ModelViewer to reflected files.
Implement boolean support.

Change-Id: Iac2dc28067ac430b3e413fc651dfaa0b96214e2e
2010-06-21 17:42:41 -07:00
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