Avoid throwing when 0 size layer requested
bug:30032790
Change-Id: I8553af0d0b0d59fea6535d03479c4e7134a9f4f9
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h
index 696cc29..3952798 100644
--- a/libs/hwui/RenderProperties.h
+++ b/libs/hwui/RenderProperties.h
@@ -611,9 +611,7 @@
bool fitsOnLayer() const {
const DeviceInfo* deviceInfo = DeviceInfo::get();
return mPrimitiveFields.mWidth <= deviceInfo->maxTextureSize()
- && mPrimitiveFields.mHeight <= deviceInfo->maxTextureSize()
- && mPrimitiveFields.mWidth > 0
- && mPrimitiveFields.mHeight > 0;
+ && mPrimitiveFields.mHeight <= deviceInfo->maxTextureSize();
}
bool promotedToLayer() const {