Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7448a54 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9504598 from ea44678b to tm-qpr3-release

Change-Id: I0ee70b6ed6c27798ec9b7b9a1b31614b69b49610
parents 9c461bff ea44678b
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -42,9 +42,15 @@ public:
        mWidth(width), mHeight(height),
        mDisplayWidth(displayWidth), mDisplayHeight(displayHeight),
        mTileWidth(tileWidth), mTileHeight(tileHeight), mDurationUs(0),
        mRotationAngle(angle), mBytesPerPixel(bpp), mRowBytes(bpp * width),
        mSize(hasData ? (bpp * width * height) : 0),
        mIccSize(iccSize), mBitDepth(bitDepth) {
        mRotationAngle(angle), mBytesPerPixel(bpp), mIccSize(iccSize),
        mBitDepth(bitDepth) {
            uint32_t multVal;
            mRowBytes = __builtin_mul_overflow(bpp, width, &multVal) ? 0 : multVal;
            mSize = __builtin_mul_overflow(multVal, height, &multVal) ? 0 : multVal;
            if (hasData && (mRowBytes == 0 || mSize == 0)) {
                ALOGE("Frame rowBytes/ size overflow %dx%d bpp %d", width, height, bpp);
                android_errorWriteLog(0x534e4554, "233006499");
            }
    }

    void init(const VideoFrame& copy, const void* iccData, size_t iccSize) {