Skip to content

Commit

Permalink
BufferQueue.cpp: allocate directly as we don't have SF
Browse files Browse the repository at this point in the history
Change-Id: I4bd3f6e057a24fe16360b7930c6fdd1f8ad9cbf2

Signed-off-by: Ondrej Kubik <[email protected]>
  • Loading branch information
kubiko authored and mariogrip committed Nov 2, 2015
1 parent dda3ba0 commit ac0afed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libs/gui/BufferQueueCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <gui/BufferQueueCore.h>
#include <gui/IConsumerListener.h>
#include <gui/IGraphicBufferAlloc.h>
#include <gui/GraphicBufferAlloc.h>
#include <gui/IProducerListener.h>
#include <gui/ISurfaceComposer.h>
#include <private/gui/ComposerService.h>
Expand Down Expand Up @@ -69,10 +70,10 @@ BufferQueueCore::BufferQueueCore(const sp<IGraphicBufferAlloc>& allocator) :
mIsAllocatingCondition()
{
if (allocator == NULL) {
sp<ISurfaceComposer> composer(ComposerService::getComposerService());
mAllocator = composer->createGraphicBufferAlloc();
if (mAllocator == NULL) {
BQ_LOGE("createGraphicBufferAlloc failed");
// Allocate directly as with Ubuntu Touch we don't have SF
mAllocator = new GraphicBufferAlloc();
if (mAllocator == 0) {
BQ_LOGE("GraphicBufferAlloc() failed in BufferQueue()");
}
}
}
Expand Down

0 comments on commit ac0afed

Please sign in to comment.