From b6a0ca7276017ac6d2e846a857d663941a5bd382 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Queru Date: Tue, 16 Jul 2013 09:38:03 -0700 Subject: [PATCH] Tweaks for forward compatibility Change-Id: Id6a96521b3fd5bd2a034fe89cfa4d3a179a66328 --- include/gui/GLConsumer.h | 3 +++ libs/gui/GLConsumer.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/include/gui/GLConsumer.h b/include/gui/GLConsumer.h index f0a75dc51..1ef54f59c 100644 --- a/include/gui/GLConsumer.h +++ b/include/gui/GLConsumer.h @@ -85,6 +85,9 @@ public: // purely to allow a GLConsumer to be transferred from one consumer // context to another. If such a transfer is not needed there is no // requirement that either of these methods be called. + GLConsumer(const sp& bq, + GLuint tex, GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, + bool useFenceSync = true); GLConsumer(GLuint tex, bool allowSynchronousMode = true, GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true, const sp &bufferQueue = 0); diff --git a/libs/gui/GLConsumer.cpp b/libs/gui/GLConsumer.cpp index bec0f9024..dc46a5177 100644 --- a/libs/gui/GLConsumer.cpp +++ b/libs/gui/GLConsumer.cpp @@ -78,6 +78,13 @@ static float mtxRot90[16] = { static void mtxMul(float out[16], const float a[16], const float b[16]); +GLConsumer::GLConsumer(const sp& bq, GLuint tex, + GLenum texTarget, bool useFenceSync) : + ConsumerBase(bq), + mUseFenceSync(useFenceSync), + mTexTarget(texTarget) {} + + GLConsumer::GLConsumer(GLuint tex, bool allowSynchronousMode, GLenum texTarget, bool useFenceSync, const sp &bufferQueue) : ConsumerBase(bufferQueue == 0 ? new BufferQueue(allowSynchronousMode) : bufferQueue),