Merge remote-tracking branch 'goog/jb-dev-mako' into jb-mr1-dev

Conflicts:
	include/media/hardware/CryptoAPI.h

Change-Id: I84bf34edbef000558f088bbf1d1e5b55d6217d2e
This commit is contained in:
Ed Heyl 2012-07-28 09:55:54 -07:00
commit 747c480b0e
3 changed files with 16 additions and 8 deletions

View File

@ -159,6 +159,7 @@ typedef enum OMX_COLOR_FORMATTYPE {
OMX_COLOR_FormatAndroidOpaque = 0x7F000789,
OMX_TI_COLOR_FormatYUV420PackedSemiPlanar = 0x7F000100,
OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00,
OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka = 0x7FA30C03,
OMX_COLOR_FormatMax = 0x7FFFFFFF
} OMX_COLOR_FORMATTYPE;

View File

@ -28,7 +28,8 @@
#include <ui/ANativeObjectBase.h>
#include <ui/Rect.h>
#define NUM_FRAME_BUFFERS 2
#define MIN_NUM_FRAME_BUFFERS 2
#define MAX_NUM_FRAME_BUFFERS 3
extern "C" EGLNativeWindowType android_createDisplaySurface(void);
@ -77,7 +78,7 @@ private:
framebuffer_device_t* fbDev;
alloc_device_t* grDev;
sp<NativeBuffer> buffers[NUM_FRAME_BUFFERS];
sp<NativeBuffer> buffers[MAX_NUM_FRAME_BUFFERS];
sp<NativeBuffer> front;
mutable Mutex mutex;

View File

@ -93,8 +93,13 @@ FramebufferNativeWindow::FramebufferNativeWindow()
mUpdateOnDemand = (fbDev->setUpdateRect != 0);
// initialize the buffer FIFO
mNumBuffers = NUM_FRAME_BUFFERS;
mNumFreeBuffers = NUM_FRAME_BUFFERS;
if(fbDev->numFramebuffers >= MIN_NUM_FRAME_BUFFERS &&
fbDev->numFramebuffers <= MAX_NUM_FRAME_BUFFERS){
mNumBuffers = fbDev->numFramebuffers;
} else {
mNumBuffers = MIN_NUM_FRAME_BUFFERS;
}
mNumFreeBuffers = mNumBuffers;
mBufferHead = mNumBuffers-1;
/*
@ -158,10 +163,11 @@ FramebufferNativeWindow::FramebufferNativeWindow()
FramebufferNativeWindow::~FramebufferNativeWindow()
{
if (grDev) {
if (buffers[0] != NULL)
grDev->free(grDev, buffers[0]->handle);
if (buffers[1] != NULL)
grDev->free(grDev, buffers[1]->handle);
for(int i = 0; i < mNumBuffers; i++) {
if (buffers[i] != NULL) {
grDev->free(grDev, buffers[i]->handle);
}
}
gralloc_close(grDev);
}