Commit Graph

7 Commits

Author SHA1 Message Date
Jamie Gennis
9a78c90cd4 Fix remote GraphicBuffer allocation in SurfaceFlinger.
This change fixes a horrible hack that I did to allow application
processes to create GraphicBuffer objects by making a binder call to
SurfaceFlinger.  This change introduces a new binder interface
specifically for doing this, and does it in such a way that
SurfaceFlinger will maintain a reference to the buffers until the app is
done with them.

Change-Id: Icb240397c6c206d7f69124c1497a829f051cb49b
2011-01-13 12:19:04 -08:00
Jamie Gennis
235c424c9a Fix a bug in SurfaceTexture::dequeueBuffer.
This change fixes a bug that allowed the most recently queued buffer to
be returned by dequeueBuffer.  At the next updateTexImage call, the
dequeued buffer would be set as the contents of the texture even though
the client could be writing to it.

Change-Id: I53dc14eed13262475627d5551337df57fd78fe00
2011-01-12 11:28:38 -08:00
Jamie Gennis
f238e28500 Implement crop & transform for SurfaceTexture.
This change adds support for the setCrop and setTransform methods of the
SurfaceTexture C++ class.  The crop and transform for the current
texture will be accessed by applications as a single texture coordinate
transform matrix.

Change-Id: I6482bf96f680e5c175364e848936db3908d6c8f8
2011-01-12 11:28:38 -08:00
Jamie Gennis
67eedd74ab Fix a bug in SurfaceTexture::setBufferCount.
We need to reset mCurrentTexture and mLastQueued in setBufferCount
because it frees all of the buffers associated with the buffer slots.

Change-Id: Ie2f834ec1c07ce7a4ab9b2b5fc5fe8c294010c60
2011-01-09 16:40:06 -08:00
Jamie Gennis
e70d8b4393 Add method logging to the SurfaceTexture C++ class.
Change-Id: Ic05b05428d34c04634ce9fc3f924ff3322bb2da2
2011-01-09 16:40:06 -08:00
Jamie Gennis
3461e0fadf Initialize the SurfaceTexture buffer slots.
Change-Id: I81a562ad897173f33cd6a2127737718a7db610eb
2011-01-09 16:40:06 -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