Commit Graph

7990 Commits

Author SHA1 Message Date
David 'Digit' Turner
47cbdfb291 emulator: opengl: remove debug traces.
You can still re-enable them by uncommenting one line in
development/tools/emulator/opengl/Android.mk

Change-Id: Ie0a640b6f3359b437aba40b124da0892defb00ef
2011-08-24 16:06:21 +02:00
David 'Digit' Turner
cecb6a0e36 emulator: opengl: Make host decoder libraries static
These libraries are only used by libOpenglRender, so make them
static so that their code is included in this shared library
instead. This reduces the shared library dependencies that
will be required from the emulator.

Change-Id: I24438932f0d6b40852b515140ea6950c04124fdd
2011-08-24 16:06:21 +02:00
David 'Digit' Turner
6efe381c82 emulator: opengl: build gralloc driver by default
This patch forces the default definition of BUILD_EMULATOR_OPENGL_DRIVER
to true by default, which is the common case where we will build the
goldfish-specific gralloc hardware module to allow SurfaceFlinger to
use GLES emulation exclusively.

The only reason to define thi to 'false' today is to debug specific
apps, but this requires displaying the GL output in a different window
than the emulator to be usable.

Change-Id: Iaf03a9c780449bb6b991928d324a088021a73203
2011-08-24 16:06:21 +02:00
David 'Digit' Turner
5dfd5b292a emulator: opengl: support moved shared libraries.
It is possible to move the final installation path of a shared
library by using LOCAL_MODULE_PATH/LOCAL_UNSTRIPPED_PATH in its
module declaration.

We do this for example to put certain libraries under /system/lib/egl
or /system/lib/hw.

However, the Android build system has a small bug where you cannot
depend on these shared libraries because it will complain it doesn't
find them under /system/lib, the default install location.

More precisely, consider libfoo defined as:

  include $(CLEAR_VARS)
  LOCAL_MODULE := libfoo
  LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
  ...
  include $(BUILD_SHARED_LIBRARY)

Its final binary will be installed to /system/lib/egl/libfoo.so

Now, let's write a module that depends on it, as:

  include $(CLEAR_VARS)
  LOCAL_MODULE := libbar
  LOCAL_SHARED_LIBRARIES += libfoo
  ...
  include $(BUILD_SHARED_LIBRARY)

The build system will complain there is no rule to define the target
/system/lib/libfoo.so, but the target should be /system/lib/egl/libfoo.so.

A work-around is to define libbar as follows instead:

  include $(CLEAR_VARS)
  LOCAL_MODULE := libbar
  LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_SHARED_LIBRARIES)/egl/libfoo.so
  ...
  include $(BUILD_SHARED_LIBRARY)

This works if you don't need to link against the library when building your
shared library (which is fortunately the case for the GLES emulation
libraries).

That's essentially what this patch implements under common.mk. We update
emugl-set-shared-library-subpath to record that a module has been "moved",
and we avoid adding them to the LOCAL_SHARED_LIBRARIES variable of the
modules that export it.

+ Simplify three Android.mk files accordingly.

Change-Id: Id15bef5359b0daa8d82bfaa5abf9346f00190ab5
2011-08-24 16:01:00 +02:00
David 'Digit' Turner
e2dda38017 emulator: opengl: Avoid conflicts with SDL_CONFIG
Do not redefine SDL_CONFIG to avoid conflicts with the emulator's
build system which depend on its definition. Note that this has
been fixed in another patch (https://review.source.android.com/25684)
but it is also cleaner to do this here.

Change-Id: I1a30d200e467ac7a91a1e6135fa1de34033e8df0
2011-08-24 16:00:56 +02:00
David 'Digit' Turner
0008793af3 emulator: opengl: fix Windows build
Change-Id: I6953feee41cb2e27f884629104ff6b3b9cccabbc
2011-08-24 16:00:55 +02:00
Brian Carlstrom
974b1d6742 Removed --target-api option from dx.
Change-Id: Ia0d633edfe414061bb313f43c45f9ef55b45f380
2011-08-24 00:20:48 -07:00
David 'Digit' Turner
bb3784d646 ndk: update JNIEXPORT declaration in <jni.h>
This patch updates the definition of JNIEXPORT in <jni.h> to
use the "default" ELF visibility attribute for JNI_OnLoad and
any function that uses the macro for its definition.

This is handy when a developer wants to use hidden visibility
by default by using a compiler flag like -fvisibility=hidden
in its Android.mk or custom build script.

Change-Id: I95112932731216a9a4986820a1875edfb3f52e5b
2011-08-23 16:08:17 +02:00
David 'Digit' Turner
503419ca75 Remove obsolete comments
Change-Id: Ibaeca7f3cd17305dd4cac042d6020455c5675e2d
2011-08-23 14:10:46 +02:00
David Turner
8597e73b09 am 215a9b22: am 4b9e753f: am beda8a2f: Merge "opengles emulator- check framebuffer status fix"
* commit '215a9b221436a1f1137a48c529d955893dad0736':
  opengles emulator- check framebuffer status fix
2011-08-22 05:39:56 -07:00
David Turner
215a9b2214 am 4b9e753f: am beda8a2f: Merge "opengles emulator- check framebuffer status fix"
* commit '4b9e753fd5fe8e39b122c31e4f4d0911a4c65dc6':
  opengles emulator- check framebuffer status fix
2011-08-22 05:37:28 -07:00
David Turner
4b9e753fd5 am beda8a2f: Merge "opengles emulator- check framebuffer status fix"
* commit 'beda8a2ff919215f082833acc7265f0a5372f048':
  opengles emulator- check framebuffer status fix
2011-08-22 05:35:34 -07:00
David Turner
beda8a2ff9 Merge "opengles emulator- check framebuffer status fix" 2011-08-22 05:20:30 -07:00
Liran
f7e7e467ce opengles emulator- check framebuffer status fix
add drawValidate when calling glCheckFramebufferStatus
in the draw validate, a color attachement will be added to the
framebuffer if there is no target attached to COLOR_ATTACHMENT
of the framebuffer.
opengl does not allow framebuffer with no color attachement
so CheckFramebufferStatus would return INCOMPLETE status.

We already call drawValidate before any draw, the call was
missing at glCheckFramebufferStatus.

Change-Id: I94b930024c3076ac5fe0f8662d11884729c4f953
2011-08-22 14:11:45 +02:00
David Turner
fd783762b0 am 7de05220: am 0b21f486: am b5588b2e: Merge "opengles emulator: fixes flashing effect on Mac"
* commit '7de05220d9ac57691beb4b9a38b7b2113b0f41ab':
  opengles emulator: fixes flashing effect on Mac
2011-08-22 04:19:09 -07:00
David Turner
5df789464c am c3b673b9: am d11fe07f: am 2b80fc12: Merge "opengles emulator: fixed EGL sharing context"
* commit 'c3b673b99cb8e5650355bcb27079dc92b38dbb12':
  opengles emulator: fixed EGL sharing context
2011-08-22 04:19:04 -07:00
David Turner
7de05220d9 am 0b21f486: am b5588b2e: Merge "opengles emulator: fixes flashing effect on Mac"
* commit '0b21f4863bb56f7f5e159dd1cb8dbdba364a7c3e':
  opengles emulator: fixes flashing effect on Mac
2011-08-22 04:15:26 -07:00
David Turner
c3b673b99c am d11fe07f: am 2b80fc12: Merge "opengles emulator: fixed EGL sharing context"
* commit 'd11fe07fed4a1d06ece5b21a05ab9fd302abc4bf':
  opengles emulator: fixed EGL sharing context
2011-08-22 04:15:23 -07:00
David Turner
0b21f4863b am b5588b2e: Merge "opengles emulator: fixes flashing effect on Mac"
* commit 'b5588b2e86ea7b2f19bed58f2e1078393c66fd6a':
  opengles emulator: fixes flashing effect on Mac
2011-08-22 04:11:15 -07:00
David Turner
d11fe07fed am 2b80fc12: Merge "opengles emulator: fixed EGL sharing context"
* commit '2b80fc12bb3385ac6d4a548343c359b855c56ece':
  opengles emulator: fixed EGL sharing context
2011-08-22 04:11:14 -07:00
David Turner
b5588b2e86 Merge "opengles emulator: fixes flashing effect on Mac" 2011-08-22 03:56:58 -07:00
David Turner
2b80fc12bb Merge "opengles emulator: fixed EGL sharing context" 2011-08-22 03:56:25 -07:00
Flavio Lerda
2d7184f851 Remove tests for obsolete repository.
We re-organized the code to live in one of the existing packages and
therefore we no longer need the tests to be run on their own.

Change-Id: I55e6e58628d384218adc6c116f790b540709ec3c
2011-08-21 15:23:15 +01:00
David Hu
dcb3c9e01a Merge "GPS Location Test Build Change" 2011-08-20 18:51:00 -07:00
Jeff Brown
ce77ef5f1d Enhance the TouchPaint sample with stylus support.
Added basic stylus and hover support to the sample to illustrate
the usage of pressure, size, orientation, distance, tilt and tool type
information.

Change-Id: I1689adc38d5904870e005300b3317c44c214fc08
2011-08-19 15:01:39 -07:00
Narayan Kamath
e6e13cdc7f Fix a typo in the sample engine settings.
This causes the engine settings dialog to not inflate.

bug:5188172

Change-Id: I813c007e6f20b63ed47458028afc7d9022e602b6
2011-08-19 12:57:01 +01:00
Owen Lin
43e17f5eef Merge "Modify the classpath due to the location changing of Gallery." 2011-08-18 21:43:04 -07:00
Alex Sakhartchouk
cfa4dd40c5 Merge "Adding ability to strip geometry from collada files. Fixing element/type creation. Build test." 2011-08-18 13:59:26 -07:00
Guy Zadickario
4629d2412b opengles emulator: fixes flashing effect on Mac
There is a flashing effect we see on Mac when switching between
drawables (pbuffer and a window) on the same context.
This change make the FrameBuffer object in the renderer to use
two different OpenGL contexts, one which is used while the pbuffer
drawable is bound and another which is used when the subwindow is
bounded during swap. The two contexts share textures so both contexts
have access to all allocated color buffers.

While this fixes the flashing effect on Mac, it should be more effective on
other platforms as well.

Change-Id: I63b49f0cdae8e2785765503750bbf5fbd4d963a1
2011-08-18 13:36:38 +03:00
Guy Zadickario
bdf4c1f436 opengles emulator: fixed EGL sharing context
Wrong share group was set up when two user contexts are sharing !
That means that shared context was not really worked before, now it does.

Change-Id: Ia4edbba0441e309902b2c48c44865342410bae3d
2011-08-18 13:36:38 +03:00
Owen Lin
db03e6dd5f Modify the classpath due to the location changing of Gallery.
Change-Id: Ib8e2782a20d11cec8aa4cb168aedac2e6ca8d980
fix: 5176434
2011-08-18 16:10:12 +08:00
Alex Sakhartchouk
8f6a33136e Adding ability to strip geometry from collada files.
Fixing element/type creation. Build test.

Change-Id: I9f7378db3ce2a3ad102cde4de672648fbfcb6754
2011-08-17 16:43:47 -07:00
Brett Chabot
f20c9766b7 Merge "Add systemui tests to testdefs." 2011-08-17 15:43:33 -07:00
Brett Chabot
eec5042131 Add systemui tests to testdefs.
Change-Id: I4aff7f9da59da7f0da290d5b78322e97ab41f639
2011-08-17 15:40:03 -07:00
Daniel Sandler
0517450434 Merge "Reduce build widget footprint to 1x1." 2011-08-16 12:25:29 -07:00
Daniel Sandler
12a9a5aeed Reduce build widget footprint to 1x1.
Default footprint, that is.

Change-Id: Ic8cdd0f97065291837b39bb79585fb86bdf23644
2011-08-16 14:01:05 -04:00
David Turner
27cc0fe3dd am c2f31ef2: am dba6bd45: am ca7a7b05: Merge "opengles emulator: use bionic tls slot"
* commit 'c2f31ef27b778e77e71a918276f6f6cad0e7d071':
  opengles emulator: use bionic tls slot
2011-08-16 07:56:07 -07:00
David Turner
c2f31ef27b am dba6bd45: am ca7a7b05: Merge "opengles emulator: use bionic tls slot"
* commit 'dba6bd45f8a7398d217c6418211dfc9d2c34966d':
  opengles emulator: use bionic tls slot
2011-08-16 07:54:53 -07:00
David Turner
dba6bd45f8 am ca7a7b05: Merge "opengles emulator: use bionic tls slot"
* commit 'ca7a7b0571701d5b552456bb1367ed50faf1c5ce':
  opengles emulator: use bionic tls slot
2011-08-16 07:53:23 -07:00
David Turner
ca7a7b0571 Merge "opengles emulator: use bionic tls slot" 2011-08-16 07:35:29 -07:00
David Turner
f297a9e9d8 am 436dc98c: am 11064844: am 8066f12a: Merge "opengles emulator: code cleanup removing dead code"
* commit '436dc98c3d8f803e3f14cdc1193048240c7a31e7':
  opengles emulator: code cleanup removing dead code
2011-08-16 06:59:43 -07:00
David Turner
436dc98c3d am 11064844: am 8066f12a: Merge "opengles emulator: code cleanup removing dead code"
* commit '11064844ee9ed8123f1e5f815e1982bb3101dc8b':
  opengles emulator: code cleanup removing dead code
2011-08-16 06:55:50 -07:00
David Turner
11064844ee am 8066f12a: Merge "opengles emulator: code cleanup removing dead code"
* commit '8066f12a07b050809c62fda1bdae5296e81a4c11':
  opengles emulator: code cleanup removing dead code
2011-08-16 06:53:37 -07:00
David Turner
8066f12a07 Merge "opengles emulator: code cleanup removing dead code" 2011-08-16 06:30:56 -07:00
Guy Zadickario
75094ee1ac opengles emulator: use bionic tls slot
This make the EGL/GLESv1/GLESv2 libraries on the guest to use
the OPENGL bionic tls slot for faster tls access.
Note that we still setting the slower tls in order to have the
tls destructor which allow us to close the host connection
when the thread exits.

Gives slightly performance improvement, the avg score for the
teapot test in 0xBench goes from 34 to 37 fps. (This test is
near immediate mode since it renders a lot of small primitives
so it is a good candicate to be improved).

Change-Id: I9060c75cc29c2e28721fa11d3f318b438edb5da9
2011-08-16 15:12:03 +03:00
David Turner
0ccfb0b02f am 61a5598a: am ca84c2cf: am 2c68d0f3: Merge "opengles emulator: replace the readback at end of frame with blit"
* commit '61a5598aed847bc4cf6003b3cdbc96863b6f4ba2':
  opengles emulator: replace the readback at end of frame with blit
2011-08-16 03:52:13 -07:00
David Turner
61a5598aed am ca84c2cf: am 2c68d0f3: Merge "opengles emulator: replace the readback at end of frame with blit"
* commit 'ca84c2cf37597603f6502c9ba51ca8dbdccaa76d':
  opengles emulator: replace the readback at end of frame with blit
2011-08-16 03:38:49 -07:00
David Turner
ca84c2cf37 am 2c68d0f3: Merge "opengles emulator: replace the readback at end of frame with blit"
* commit '2c68d0f347fa1c8a5bc51c34399173e4592dc831':
  opengles emulator: replace the readback at end of frame with blit
2011-08-16 03:35:39 -07:00
David Turner
2c68d0f347 Merge "opengles emulator: replace the readback at end of frame with blit" 2011-08-16 03:23:55 -07:00
Guy Zadickario
b9a5baf42b opengles emulator: code cleanup removing dead code
This change removes the 'blitFromPbuffer' path in the renderer
which uses binding pbuffer to texture. This path does not work
on all platforms and is not relavent any more. It simplifies
a lot the FBConfig filtering code.

Also, added a check to fail the renderer initialization if
the translator plugin does not support EGL_KHR_gl_texture_2d_image
and GL_OES_EGL_IMAGE (by both GLES implementations [1 and 2])
since our implementation requires it.

Change-Id: Ifd4c66943a8da56308cfb7e38914c962b4f5befe
2011-08-16 12:14:02 +03:00