From aa29d857d8cbedb9e6ba3663b4e0af9108e177a7 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Mon, 30 Jul 2018 14:13:46 +0900 Subject: [PATCH] lottie: fixed warning. Change-Id: Icc12cc76584913dd1f219207c23b987c61bb4829 --- src/vector/vbitmap.cpp | 41 +---------------------------------------- src/vector/vdrawhelper.cpp | 1 + 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/src/vector/vbitmap.cpp b/src/vector/vbitmap.cpp index 5e18fde..9be3320 100644 --- a/src/vector/vbitmap.cpp +++ b/src/vector/vbitmap.cpp @@ -155,47 +155,8 @@ VBitmap::VBitmap(uchar *data, int w, int h, int bytesPerLine, VBitmap VBitmap::copy(const VRect &r) const { - if (!d) return VBitmap(); - - if (r.isNull()) { - VBitmap image(d->width, d->height, d->format); - if (image.isNull()) return image; - - if (image.d->nBytes != d->nBytes) { - int bpl = vMin(stride(), image.stride()); - for (int i = 0; i < height(); i++) - memcpy(image.scanLine(i), scanLine(i), bpl); - } else - memcpy(image.bits(), bits(), d->nBytes); - return image; - } - - int x = r.x(); - int y = r.y(); - int w = r.width(); - int h = r.height(); - - int dx = 0; - int dy = 0; - if (w <= 0 || h <= 0) return VBitmap(); - - VBitmap image(w, h, d->format); - if (image.isNull()) return image; - - if (x < 0 || y < 0 || x + w > d->width || y + h > d->height) { - // bitBlt will not cover entire image - clear it. - image.fill(0); - if (x < 0) { - dx = -x; - x = 0; - } - if (y < 0) { - dy = -y; - y = 0; - } - } // TODO implement properly. - return image; + return *this; } int VBitmap::stride() const diff --git a/src/vector/vdrawhelper.cpp b/src/vector/vdrawhelper.cpp index bec2410..ce07aac 100644 --- a/src/vector/vdrawhelper.cpp +++ b/src/vector/vdrawhelper.cpp @@ -473,6 +473,7 @@ static inline Operator getOperator(const VSpanData * data, op.srcFetch = &fetch_radial_gradient; break; default: + op.srcFetch = nullptr; break; } -- 2.7.4