Commit Graph

14 Commits

Author SHA1 Message Date
Mathias Agopian
5f2165f945 remove dependency on android_native{s_priv|buffer}.h
Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
2012-02-24 18:26:01 -08:00
Jamie Gennis
b7d87c40ef SurfaceMediaSource: use the vid enc usage bit
This change makes SurfaceMediaSource add the VIDEO_ENC usage bit when
allocating its GraphicBuffers rather than the HW_TEXTURE bit.

Change-Id: Ie20e225c894fdbc31cad6bb82b3b64c7e98074eb
2011-11-21 17:48:19 -08:00
Jamie Gennis
3599bf2c07 SurfaceFlinger: use the HWC gralloc usage bit
This change makes SurfaceFlinger always use the
GRALLOC_USAGE_HW_COMPOSER usage bit when allocating buffers that may be
passed to the HWComposer.

Change-Id: I70362a8ede2b359fb2046853f85149d597465817
2011-08-22 14:56:29 -07:00
Iliyan Malchev
697526bc9e frameworks/base: android_native_buffer_t -> ANativeWindowBuffer
Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 16:40:14 -07:00
Glenn Kasten
16f0453fee Protected surface API
To be used by DRM framework, implemented by display HAL

Change-Id: I054a07a94f4d5dbe792f3a597e2e49a100d90eb2
2011-01-28 08:04:00 -08:00
Jamie Gennis
8ba32fade1 Add the SurfaceTexture C++ implementation.
This change adds the C++ implementation of SurfaceTexture and related
classes. The goal of this is for a SurfaceTexture to be passed to
camera service or Stagefright in place of a Surface to allow camera
preview or decoded video frames to be streamed to an OpenGL ES texture
that an application can use.

Change-Id: I55c83a7017f1ecb81c9c9e3252cbd118b914296c
2011-01-06 13:20:47 -08:00
Mathias Agopian
b5a00fcb71 am 48f42f8c: am 4153bf3a: Merge "[3171580] don\'t automatically log GraphicBuffer allocation failures" into gingerbread
* commit '48f42f8c3fbd33b2f46c6290ff5963dd58938cf9':
  [3171580] don't automatically log GraphicBuffer allocation failures
2010-12-07 17:24:03 -08:00
Mathias Agopian
678bdd6349 [3171580] don't automatically log GraphicBuffer allocation failures
some of these failures are not fatal and even expected in some cases
so they should not emit a dump in the log in those cases.

Change-Id: Idcfa252e3bfa9d74e27fe4ad8f8623aa01aa9c5e
2010-12-03 17:33:09 -08:00
Jamie Gennis
309d3bb2f9 Move binder magic from the Surface class to GraphicBuffer.
- Register buffers with Gralloc when unflattening a GraphicBuffer (rather than
doing it in the Surface class).
- Add support for a GraphicBuffer that wraps an android_native_window_t*.

Change-Id: I029ac086111bbac800e5ca37eb505f558b718cd8
2010-10-10 13:09:46 -07:00
Mathias Agopian
b7e930db17 split surface management from surface's buffers management
Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
2010-06-04 18:57:41 -07:00
Mathias Agopian
98e71ddaed remove a dependency of GraphicBuffer (libui) on Parcel (libbinder).
Add a Flattenable interface to libutils which can be used to flatten
an object into bytestream + filedescriptor stream.
Parcel is modified to handle Flattenable. And GraphicBuffer implements
Flattenable.

Except for the overlay classes libui is now independent of libbinder.
2010-02-21 23:27:25 -08:00
Mathias Agopian
6fee064809 fix[2228133] pixelflinger ignores the "vertical stride" leading to artifacts when playing back video
we lost the concept of vertical stride when moving video playback to EGLImage.
Here we bring it back in a somewhat hacky-way that will work only for the
softgl/mdp backend.
2009-11-02 17:48:33 -08:00
Mathias Agopian
54ba51dff2 fix [2143798] Need to figure out how to do video
Use EGLImageKHR instead of copybit directly.
    We now have the basis to use streaming YUV textures (well, in fact
    we already are). When/if we use the GPU instead of the MDP we'll
    need to make sure it supports the appropriate YUV format.

    Also make sure we compile if EGL_ANDROID_image_native_buffer is not supported
2009-10-27 13:13:29 -07:00
Mathias Agopian
3330b20303 fix [2167050] glTexImage2D code path buggy in SurfaceFlinger
When EGLImage extension is not available, SurfaceFlinger will fallback to using
glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an
extra copy. However this code path has never been exercised and had some bugs
which this patch fix.

Mainly the scale factor wasn't computed right when falling back on glDrawElements.
We also fallback to this mode of operation if a buffer doesn't have the adequate
usage bits for EGLImage usage.

This changes only code that is currently not executed. Some refactoring was needed to
keep the change clean. This doesn't change anything functionaly.
2009-10-06 17:00:25 -07:00