summaryrefslogtreecommitdiff
path: root/libs/gui/GLConsumer.cpp
diff options
context:
space:
mode:
author Pablo Ceballos <pceballos@google.com> 2015-08-07 14:47:20 -0700
committer Pablo Ceballos <pceballos@google.com> 2015-08-24 10:50:52 -0700
commit60d6922a011fe18c111b8d30fb6ef1f655b6b15e (patch)
tree4618ad5fc60b4e25c76c9f5d1e80ad3223baff31 /libs/gui/GLConsumer.cpp
parent72f314a50f34de593686661b0a99906125d18bfd (diff)
libsgui: Change Rect default constructor
The current Rect default constructor initializes to all zeroes. Change it to initialize to an invalid Rect. Modify all of the existing invocations of the default constructor to maintain the existing behavior. Bug 18173359 Change-Id: Ibbad076f1550a94f56d7b1cf5350071f2022e09a
Diffstat (limited to 'libs/gui/GLConsumer.cpp')
-rw-r--r--libs/gui/GLConsumer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/gui/GLConsumer.cpp b/libs/gui/GLConsumer.cpp
index 757e08a907..be5075c83c 100644
--- a/libs/gui/GLConsumer.cpp
+++ b/libs/gui/GLConsumer.cpp
@@ -130,6 +130,7 @@ static bool isEglImageCroppable(const Rect& crop) {
GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex,
uint32_t texTarget, bool useFenceSync, bool isControlledByApp) :
ConsumerBase(bq, isControlledByApp),
+ mCurrentCrop(Rect::EMPTY_RECT),
mCurrentTransform(0),
mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
mCurrentFence(Fence::NO_FENCE),
@@ -157,6 +158,7 @@ GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex,
GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t texTarget,
bool useFenceSync, bool isControlledByApp) :
ConsumerBase(bq, isControlledByApp),
+ mCurrentCrop(Rect::EMPTY_RECT),
mCurrentTransform(0),
mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
mCurrentFence(Fence::NO_FENCE),
@@ -1083,7 +1085,8 @@ static void mtxMul(float out[16], const float a[16], const float b[16]) {
GLConsumer::EglImage::EglImage(sp<GraphicBuffer> graphicBuffer) :
mGraphicBuffer(graphicBuffer),
mEglImage(EGL_NO_IMAGE_KHR),
- mEglDisplay(EGL_NO_DISPLAY) {
+ mEglDisplay(EGL_NO_DISPLAY),
+ mCropRect(Rect::EMPTY_RECT) {
}
GLConsumer::EglImage::~EglImage() {