Commit Graph

30 Commits

Author SHA1 Message Date
Jesse Hall
073e40031c resolved conflicts for merge of c765e79a to master
Change-Id: Id7018ac9f551ec8b224f030d8b04229ac2407a17
2012-02-27 14:12:32 -08:00
Jesse Hall
5333119e45 am a59610fa: am 9e016ede: am cbc7300c: EmuGL: enable SurfaceTexture async mode
* commit 'a59610fab6893530f15a9cfad8cdd97e4c5d578a':
  EmuGL: enable SurfaceTexture async mode
2012-02-27 14:00:23 -08:00
Mathias Agopian
a3b1c78767 remove dependency on android_natives_priv.h
Change-Id: If06ea9aeb836d6ceb09745770956a25211f428d3
2012-02-24 18:04:51 -08:00
Jesse Hall
7ef79e49c7 EmuGL: don't [de]queue buffers in eglMakeCurrent
Whenever a surface was attached to a context, it was dequeing a new
buffer, and enqueing it when detached. This has the effect of doing a
SwapBuffers on detach/attach cycle, which is just wrong and
occasionally caused visible glitches (e.g. animations going backwards
for one frame). It also broke some SurfaceTexture tests which
(validly) depend on specific buffer production/consumption counts.

Change-Id: Ibd4761e8842871b79fd9edf52272900193cb672d
2012-02-24 15:54:59 -08:00
Jesse Hall
cbc7300cb2 EmuGL: enable SurfaceTexture async mode
Pass the swap interval from eglSwapInterval to the native window so it
can enable/disable SurfaceTexture's async mode. Fixes the deadlock in
SurfaceTextureGLToGLTest.EglDestroySurfaceUnrefsBuffers.

Change-Id: I19bf69247341f5617223722df63d6c7f8cf389c6
2012-02-24 15:54:58 -08:00
Jesse Hall
f3c068c79a am bcd311ce: am 9cb15c9e: am 8bd39ae1: Merge "EmuGL: GLESv2 support for OES_EGL_image_external" into ics-mr1
* commit 'bcd311ce0b17d892f87d2e31741dc1873491d20f':
  EmuGL: GLESv2 support for OES_EGL_image_external
2012-02-24 12:11:52 -08:00
Jesse Hall
72efa999d1 am ba8c8d15: am 66a386e3: am 00e61338: EmuGL: refinements to GLESv1 image_external
* commit 'ba8c8d1591a25b13047b24c10a1315ff178b2160':
  EmuGL: refinements to GLESv1 image_external
2012-02-23 12:25:49 -08:00
Jesse Hall
1d4fcce585 am 4660966b: am 144e1b59: am ac018fe3: EmuGL: refcount ColorBuffers on the host
* commit '4660966b791d8ea1be086a9ab0c58c672cca36ee':
  EmuGL: refcount ColorBuffers on the host
2012-02-23 12:25:47 -08:00
Jesse Hall
d6bd1843ce EmuGL: GLESv2 support for OES_EGL_image_external
Change-Id: I8911328d5dcccdf4731bd2d8fd953c12fdec5f1b
2012-02-22 15:03:30 -08:00
Jesse Hall
00e61338b8 EmuGL: refinements to GLESv1 image_external
* EGLImageTargetRenderbufferStorageOES was incorrectly accepting
  TEXTURE_EXTERNAL_OES as a target. Revert that; the host GL will
  correctly reject it with INVALID_ENUM.

* Handle the REQUIRED_TEXTURE_IMAGE_UNITS_OES texparameter query.

* Validate texture parameters set on TEXTURE_EXTERNAL textures;
  otherwise invalid parameters would work on the emulator but not on a
  real device.

Change-Id: I49a088608d58a9822f33e5916bd354eee3709127
2012-02-21 11:13:20 -08:00
Jesse Hall
ac018fe3f6 EmuGL: refcount ColorBuffers on the host
The gralloc API assumes system-wide reference counting of gralloc
buffers. The host-GL accelerated gralloc maps buffers to host-side
ColorBuffer objects, but was destroying them unconditionally in
gralloc_free(), ignoring any additional references from
gralloc_register_buffer().

This affected the SurfaceTexture gralloc buffers used by the
Browser/WebView. For some reason these buffers are actually allocated
by SurfaceFlinger and passed back to the WebView through Binder. But
since SurfaceFlinger doesn't actually need the buffer for anything,
sometime after the WebView has called gralloc_register_buffer()
SurfaceFlinger calls gralloc_free() on it. This caused the host
ColorBuffer to be destroyed long before the WebView is done using it.

Change-Id: I33dbee887a48a6907041cf19e9f38a1f6c983eff
2012-02-21 11:13:20 -08:00
Mathias Agopian
baa8e96c70 egl.cfg can now only have a single entry
Change-Id: Ic86671e41859dbf40ed4408f62450019c2164015
2012-02-13 20:38:35 -08:00
Steve Block
8ad367c36d Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE
See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I2eb298dae73ccfd8e9ee8350344d9f5c96f5c422
2012-01-09 21:35:44 +00:00
Steve Block
5a622cba8c Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic6cac56d137f705dfa7266f21e9b0269219bd5d1
2012-01-09 10:39:43 +00:00
Steve Block
6aff44c27e Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I03c41e20d8f5d7f3c7ef1f01506885e3e250e921
2012-01-06 10:06:41 +00:00
Steve Block
112bc5e57e Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: Ia14c98936bb1dc74e681bf2de342ad6861646778
2012-01-03 22:29:55 +00:00
Jesse Hall
5d721ef6a1 am b0a30e43: EmuGL: remove broken EGL buffer refcounting
* commit 'b0a30e43889415a9a40b9519392ad3be295b9465':
  EmuGL: remove broken EGL buffer refcounting
2011-12-12 15:23:59 -08:00
Jesse Hall
b0a30e4388 EmuGL: remove broken EGL buffer refcounting
The emulator EGL implementation tried to hold its own reference to
buffers acquired/released with dequeueBuffer/queueBuffer, but was
missing an incRef after dequeueBuffer during swapBuffers.

Since the native window holds a reference to the buffer between
dequeueBuffer and queueBuffer, the EGL reference isn't needed anyway.

Change-Id: I95e4f9f4faf59198f99939cdca6603fe176c56bc
2011-12-12 14:05:16 -08:00
Jesse Hall
c08eaec1e2 am 96cd9c31: Merge "EmuGL: capture VBO contents in GL2Encoder" into ics-mr0
* commit '96cd9c3130b6215534e863b94637b384da8102c9':
  EmuGL: capture VBO contents in GL2Encoder
2011-12-01 14:37:51 -08:00
Jesse Hall
7906431d04 EmuGL: capture VBO contents in GL2Encoder
The glBufferData, glBufferSubData, and glDeleteBuffers entry points
had interception routines in GL2Encoder which cache the data, but they
weren't hooked up. So when glDrawElements tried to retrieve the cached
data it wasn't there.

Change-Id: Iaed11fccaefab3186485be53a0f15c8ca0a255f9
2011-12-01 12:01:27 -08:00
Jesse Hall
3a655154d0 am af4f66be: EmuGL: implement OES_EGL_image_external for GLESv1
* commit 'af4f66be50b17c8b8fce1dda53389bb0a10968ba':
  EmuGL: implement OES_EGL_image_external for GLESv1
2011-11-22 15:43:26 -08:00
Jesse Hall
af4f66be50 EmuGL: implement OES_EGL_image_external for GLESv1
GLESv2 support will come in a followup change but will take advantage
of the GLClientState changes.

Change-Id: Ib6cbb4dafbd071e3b59b1e5d808b3e23656ada92
2011-11-21 13:47:49 -08:00
Mathias Agopian
9c14396791 should fix sdk build
Change-Id: I5b403056f5245eae9a6476d9d573a3b1c25ea0c6
2011-11-15 21:09:15 -08:00
David 'Digit' Turner
0e205e6d6e emulator: opengl: minor fix and reformatting
This patches fixes a minor invalid usage of delete (instead of delete[])
and reformats the source code a little to make it more obvious.

Change-Id: If853d12e74549abcc6682430c837b0f14da81fdc
2011-10-19 17:54:20 +02:00
David 'Digit' Turner
5d7f0875e9 emulator: opengl: 'large' buffer optimization
This patch modifies the guest encoding libraries to avoid
un-necessary copies when sending large buffers (e.g. pixels)
to the host. Instead, the data is sent directly through a
new IOStream method (writeFully()).

On my machine, this improves the NenaMark2 benchmark
(from 50.8 to 57.1 fps). More importantly, this speeds up
the display of non-GL surfaces too, which are sent through
the special rcUpdateColorBuffer() function in gralloc_goldfish.

This is noticeable in many parts of the UI (e.g. when scrolling
through lists).

To tag a given parameter, use the new 'isLarge' variable flag
in the protocol .attrib file.

Implemented for the following encoding functions:

  rcUpdateColorBuffer
  glTexSubImage2D
  glTexImage2Di
  glBufferData
  glBufferSubData
  glCompressedTexImage2D
  glCompressedTexSubImage2D
  glTexImage3DOES
  glTexSubImage3DOES
  glCompressedTexImage3DOES
  glCompressedTexSubImage3DOES

+ Optimize the auto-generated encoder functions to avoid
  repeated function calls (for size computations).

Change-Id: I13a02607b606c40cd05984cd2051b1f3424bc2d0
2011-09-20 15:58:54 +02:00
David 'Digit' Turner
e72ed049a8 emulator: opengl: improve gralloc debug traces
+ shut up the gralloc module for now.

Change-Id: I7d22c63f298c4e50d96655adf4025a65b7405c28
2011-09-20 15:58:54 +02:00
David 'Digit' Turner
9a6c02877a emulator: opengl: fix inccorect delete usage.
Change-Id: I3afc5197d2d13c4698a535ed769a56920e81c94f
2011-09-20 15:58:53 +02:00
David 'Digit' Turner
6aca3d9f7c emulator: opengl: add missing EGLDisplay destructor
Change-Id: I788904a597b7929a7fc7a5db3cf5baa79b9f1936
2011-09-20 15:58:53 +02:00
David 'Digit' Turner
8abfab1baf emulator: opengl: make internal tables const.
+ fix a typo.

Change-Id: I4c290d673de5eff24998b97cfb996d9da17dd006
2011-09-20 15:58:53 +02:00
David 'Digit' Turner
4e6af749d5 emulator: opengl: Back-port GLES emulation from the master tree.
The modules here are only built when BUILD_EMULATOR_OPENGL is defined to true
in your environment or your BoardConfig.mk (see tools/emulator/opengl/Android.mk)

Change-Id: I5f32c35b4452fb5a7b4d5f9fc5870ec1da6032e6
2011-09-20 15:58:41 +02:00