Bug 1021765 - Backport the fix from bug 988704 to JB-based devices as well. r=sotaro

This commit is contained in:
Vincent Liu 2014-06-08 08:49:50 +08:00
Родитель d91bae5b76
Коммит 246ecbb60e
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -178,7 +178,7 @@ GonkCameraHardware::Init()
mNativeWindow = new GonkNativeWindow(GonkCameraHardware::MIN_UNDEQUEUED_BUFFERS);
mCamera->setPreviewTarget(mNativeWindow->getBufferQueue());
#elif ANDROID_VERSION >= 17
mNativeWindow = new GonkNativeWindow();
mNativeWindow = new GonkNativeWindow(GonkCameraHardware::MIN_UNDEQUEUED_BUFFERS);
mCamera->setPreviewTexture(mNativeWindow->getBufferQueue());
#else
mNativeWindow = new GonkNativeWindow();

Просмотреть файл

@ -36,10 +36,10 @@ using namespace mozilla::layers;
namespace android {
GonkNativeWindow::GonkNativeWindow() :
GonkNativeWindow::GonkNativeWindow(int bufferCount) :
GonkConsumerBase(new GonkBufferQueue(true) )
{
mBufferQueue->setMaxAcquiredBufferCount(GonkBufferQueue::MIN_UNDEQUEUED_BUFFERS);
mBufferQueue->setMaxAcquiredBufferCount(bufferCount);
}
GonkNativeWindow::~GonkNativeWindow() {

Просмотреть файл

@ -64,7 +64,7 @@ class GonkNativeWindow: public GonkConsumerBase
// the consumer usage flags passed to the graphics allocator. The
// bufferCount parameter specifies how many buffers can be locked for user
// access at the same time.
GonkNativeWindow();
GonkNativeWindow(int bufferCount = GonkBufferQueue::MIN_UNDEQUEUED_BUFFERS);
virtual ~GonkNativeWindow();