Commit Graph

2323 Commits

Author SHA1 Message Date
Jesse Hall
9cb15c9e81 am 8bd39ae1: Merge "EmuGL: GLESv2 support for OES_EGL_image_external" into ics-mr1
* commit '8bd39ae17caac6d275d785ce9420d7e643f15eb9':
  EmuGL: GLESv2 support for OES_EGL_image_external
2012-02-24 12:08:38 -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
66a386e33a am 00e61338: EmuGL: refinements to GLESv1 image_external
* commit '00e61338b8374de090e81537047846ca06f88280':
  EmuGL: refinements to GLESv1 image_external
2012-02-22 13:47:27 -08:00
Jesse Hall
144e1b5998 am ac018fe3: EmuGL: refcount ColorBuffers on the host
* commit 'ac018fe3f65e18083a2dd317f73e4139bfa5fee6':
  EmuGL: refcount ColorBuffers on the host
2012-02-22 13:45:42 -08:00
Jesse Hall
fc7a319e5c am 91d4e8e1: GLESv2 translator: don\'t delete EGLImage textures
* commit '91d4e8e195592dbc812441597118452f887ea07d':
  GLESv2 translator: don't delete EGLImage textures
2012-02-22 10:11:31 -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
Jesse Hall
91d4e8e195 GLESv2 translator: don't delete EGLImage textures
Copy changes faaf1553cf and
f37a7ed6c5 from the GLESv1 translator to
the GLESv2 translator. After this, both translators use the same logic
for glEGLImageTargetTexture2DOES().

Change-Id: I0a95bf2301df7b7428abc593f38170edf4cbda30
2012-02-21 11:13:19 -08:00
Jesse Hall
1276f7ba04 am 0e981c83: EmuGL: Fix heap corruption
* commit '0e981c83041878e6a05b0a996879160fd0f320cf':
  EmuGL: Fix heap corruption
2012-02-06 13:36:19 -08:00
Jesse Hall
0e981c8304 EmuGL: Fix heap corruption
Off-by-two bug when removing textures from the tracking array could
overwrite malloc's mem chunk data structure, usually resulting in a
heap corruption abort on a later malloc/realloc/free.

Bug: 5951738
Change-Id: I11056bb62883373c2a3403f53899347ff8cdabf2
2012-02-03 22:54:24 -08:00
Jesse Hall
9b19d582d9 am 4f66a14d: Merge "EmuGL: handle NULL data in glBufferData" into ics-mr1
* commit '4f66a14d5311ee94d5a498c8e0049f6b95d4d0d6':
  EmuGL: handle NULL data in glBufferData
2012-01-11 17:12:09 -08:00
Jesse Hall
5bad48a65e EmuGL: handle NULL data in glBufferData
The data pointer argument to glBufferData can be NULL; this
[re]allocates the buffer while leaving the contents undefined.

Bug: 5833436

Change-Id: Ia1ddf62e2cd2c59d3d631e01d23d7c557ca5a52e
2012-01-11 15:40:29 -08:00
Jesse Hall
d23522e614 am f0baef2f: Merge "EmuGL: misc small cleanups" into ics-mr1
* commit 'f0baef2fed555e87a0910e5aab6b8b763487b350':
  EmuGL: misc small cleanups
2012-01-09 15:53:49 -08:00
Jesse Hall
19b03e4ef1 am 409c49c5: Merge "EmuGL: fix GL view position in window on OS X" into ics-mr1
* commit '409c49c526508b5fa36f8bc6edc1fc70cba5a3e1':
  EmuGL: fix GL view position in window on OS X
2012-01-09 15:53:48 -08:00
Jesse Hall
f0baef2fed Merge "EmuGL: misc small cleanups" into ics-mr1 2012-01-09 15:52:15 -08:00
Jesse Hall
a592d9c043 EmuGL: misc small cleanups
* Disable verbose debug spam.
* Add missing GL enum to utility function. The default case was
  returning the correct size, so this doesn't fix any bugs, just
  removes some logcat spam.
* Comment and whitespace corrections.

Change-Id: I83fb8644331ae1072d6a8dae9c041da92073089f
2012-01-05 10:50:01 -08:00
Jesse Hall
a4fb8a60b1 EmuGL: fix GL view position in window on OS X
The code that creates the GL-accelerated screen view wasn't converting
the upper-left-relative coordinates used within the emulator to the
lower-left coordinates used by the Cocoa APIs on OS X. Since most
skins have the screen view centered vertically this often just
happened to work.

Bug: 5782118
Change-Id: I2f96ee181e850df5676d10a82d86c94421149b40
2012-01-04 15:03:39 -08:00
Al Sutton
87879839f1 Fix build on MacOS 10.7 / XCode 4
Ensure the dynamic library library gets linked in with SDL
to fix compilation errors

Change-Id: I32e6929088eaf73d707e89d10392c658b58ec465
2011-12-21 13:21:32 -08:00
Xavier Ducrohet
144589bfd0 Fix WXGA720 skin to be portrait by default.
Having it landscape by default is not representative of a phone
and triggers an issue where the system ui bar is not displayed.

Change-Id: Ic28e3739c30825fe55f8cc6cede5c9a5462f6931
2011-12-15 14:28:46 -08: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
Xavier Ducrohet
646e7964f9 Merge "Increase skin ram and vmheap." into ics-mr1 2011-12-09 15:42:26 -08:00
Xavier Ducrohet
7400b43b8c Increase skin ram and vmheap.
Change-Id: I96d8f6249ab7110717f21cd339acd8a803a579d3
2011-12-09 15:41:45 -08:00
James Dong
4fed461d11 Revert "Revert "Update the media_profiles.xml file to include..."
This reverts commit 2400b2c340.

Change-Id: I7f6823385448db5f94cdfc4df8cdf32ab9d156c2
2011-12-09 12:40:30 -08:00
David Hu
61cffb0633 Merge "Change the test to user the listener mechanism" into ics-mr1 2011-12-08 16:38:19 -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
Xavier Ducrohet
6038109394 am 2400b2c3: Revert "Update the media_profiles.xml file to include..." do not merge.
* commit '2400b2c3402e6585437274f8acd5fd6e32367bb3':
  Revert "Update the media_profiles.xml file to include..."  do not merge.
2011-11-23 14:41:05 -08:00
Xavier Ducrohet
2400b2c340 Revert "Update the media_profiles.xml file to include..." do not merge.
This reverts commit a8fe85ea64.
2011-11-23 14:36:58 -08:00
Vladimir Chtchetkine
9a1a290e58 am fd1bdd61: Update supported frame sizes for fake camera. do not merge.
* commit 'fd1bdd611a2954bfb171548b8fa288b0319a0aa9':
  Update supported frame sizes for fake camera. do not merge.
2011-11-23 14:04:29 -08:00
James Dong
a8fe85ea64 Update the media_profiles.xml file to include maximum memory usage support for video editor. do not merge.
related-to-bug: 5625690

(cherry picked from commit f8781452d9)

Change-Id: Id27eb9052f00328ba04bac8486c9ed23f3c6a09b
2011-11-23 13:14:50 -08:00
Vladimir Chtchetkine
fd1bdd611a Update supported frame sizes for fake camera. do not merge.
Camera framework requires 352x288, and 320x240 frames for video preview and video
recording. If these dimensions are missing in camera properties the camera app
may abort when entering video mode, or start video recording.

Also truned off switching fake frames, leaving only the checker board.

(cherry picked from commit 6f00e7fc48)

Change-Id: Ic50225e1700ea3b04ae5445549548f2ffe4ae2df
2011-11-23 13:14:16 -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
25902c0540 am f37a7ed6: GLES translator: don\'t delete EGLImage textures
* commit 'f37a7ed6c5c609a3afc33f81bf50893362917ae6':
  GLES translator: don't delete EGLImage textures
2011-11-22 15:37:32 -08:00
Jesse Hall
f25dc0f673 am faaf1553: EmuGL: set texture info from EGLImage
* commit 'faaf1553cfa39c23ceb198ba7edbd46ff3a11f7a':
  EmuGL: set texture info from EGLImage
2011-11-22 15:37:31 -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
Jesse Hall
f37a7ed6c5 GLES translator: don't delete EGLImage textures
When remapping a GLES texture to a different GL texture in
glEGLImageTargetTexture2DOES(), the GLES texture's previous GL texture was
deleted unconditionally. This is bad when it came from an EGLImage and is
therefore owned by (and will continue to be used by) some other object.

The code now skips deleting the old GL texture if it came from an EGLImage.
This mirrors the logic in glDeleteTextures().

Change-Id: I5b650334a7019d824517c2915b1f23961fbbd809
2011-11-21 13:14:19 -08:00
Jesse Hall
faaf1553cf EmuGL: set texture info from EGLImage
The EGL->GL translator implementation of glEGLImageTargetTexture2DOES was
properly replacing uses of the target texture object with the texture object
associated with the EGLImage in the host GL library, but wasn't updating its
own info about the texture (dimensions, etc.). This broke places where the
translator relied on knowing this, e.g. when implementing the GLES glDrawTexi
call on top of GL glDrawArrays.

Change-Id: Ia4aefd89852a2609221c56da76bfac927464c0b2
2011-11-18 14:11:49 -08:00
James Dong
f8781452d9 Update the media_profiles.xml file to include maximum memory usage support for video editor
Change-Id: I26eacaaca76b72fc5a43ee8fabacf62060418edd
related-to-bug: 5625690
2011-11-16 14:37:49 -08:00
Mathias Agopian
9c14396791 should fix sdk build
Change-Id: I5b403056f5245eae9a6476d9d573a3b1c25ea0c6
2011-11-15 21:09:15 -08:00
David Hu
9bc092f5b1 Change the test to user the listener mechanism
this is to avoid the precision issue with the coordinates

DO NOT MERGE

Change-Id: Icfab3fa6fd0a331aef12ee71c73bac04dc9685be
2011-11-08 14:43:36 -08:00
Iliyan Malchev
10fc4be16b a3dconvert: add -ldl for host builds
Change-Id: I6f594bc3d2e0e4306eee1719ee81e2ff53177aa6
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-20 16:20:45 -07:00
David 'Digit' Turner
a8f182c105 Merge "emulator: opengl: add design document for emulation implementation." 2011-10-19 10:14:13 -07:00
David 'Digit' Turner
aafffde798 Merge "emulator: opengl: minor fix and reformatting" 2011-10-19 10:13:55 -07: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
fb2ddf9347 emulator: opengl: add design document for emulation implementation.
This patch adds a rather extensive document explaining the design
of our OpenGLES emulation, both on the guest and the host.

Change-Id: I13cf1eac21e5a8a0be170b5f90100b04f9ae6d75
2011-10-19 16:43:24 +02:00
Vladimir Chtchetkine
f7f6886820 Cherry picked from c9a94b0f in master. Do not merge.
Implement CAMERA_MSG_PREVIEW_FRAME callback

Also does better work detecting pixel format for video frames, depending on the
mode that camera is intended to be operated with.

Change-Id: Idb2dfc7c0a79e81eff58f83a14af769afc713096
2011-10-18 12:32:24 -07:00
Vladimir Chtchetkine
caa1aeafba Implement CAMERA_MSG_PREVIEW_FRAME callback
Also does better work detecting pixel format for video frames, depending on the
mode that camera is intended to be operated with.

Change-Id: I352204b8d6d1a9e7857d77b6363de2bb5d5db0dd
2011-10-17 12:56:54 -07:00
Christine Chen
366396d9b0 Added exposure compensation control for the fake camera.
Change-Id: I10bc16d9d521f82e12ff335eed29465ac08b5595
2011-10-14 15:14:36 -07:00
Xavier Ducrohet
faa85e4d5b Make the VXGA720 skin indicate no hw back/home keys.
Change-Id: Iea7121903e75275849f0bcc2ecbc533aa37c3971
2011-10-04 10:51:37 -07:00