Fix a bunch of Coverity defects - class members not initialized in the constructor.
CID=14533,14036,9275,9271,4156,4153,4151,1666,1665,1618,1617,1616,1615 Review URL: https://codereview.appspot.com/5940049 git-svn-id: http://skia.googlecode.com/svn/trunk@3532 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
802eee956c
commit
a728e35edc
@ -328,7 +328,6 @@ private:
|
||||
SkPathEffect* fPathEffect;
|
||||
SkMaskFilter* fMaskFilter;
|
||||
SkRasterizer* fRasterizer;
|
||||
SkScalar fDevFrameWidth;
|
||||
|
||||
// if this is set, we draw the image from a path, rather than
|
||||
// calling generateImage.
|
||||
|
@ -20,7 +20,6 @@ public:
|
||||
virtual void filter(SkPaint*, Type);
|
||||
|
||||
private:
|
||||
uint32_t fPrevFlags; // local cache for filter/restore
|
||||
uint16_t fClearFlags; // user specified
|
||||
uint16_t fSetFlags; // user specified
|
||||
};
|
||||
|
@ -234,6 +234,7 @@ class A8_Bilinear_Sampler : public SkBitmapSampler {
|
||||
public:
|
||||
A8_Bilinear_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy)
|
||||
: SkBitmapSampler(bm, true, tmx, tmy)
|
||||
, fColor(0)
|
||||
{
|
||||
fProcTable = SkGetBilinearFilterProcTable();
|
||||
}
|
||||
@ -289,6 +290,7 @@ class A8_NoFilter_Sampler : public SkBitmapSampler {
|
||||
public:
|
||||
A8_NoFilter_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy)
|
||||
: SkBitmapSampler(bm, false, tmx, tmy)
|
||||
, fProcTable(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,9 @@
|
||||
#include "SkCubicClipper.h"
|
||||
#include "SkGeometry.h"
|
||||
|
||||
SkCubicClipper::SkCubicClipper() {}
|
||||
SkCubicClipper::SkCubicClipper() {
|
||||
fClip.setEmpty();
|
||||
}
|
||||
|
||||
void SkCubicClipper::setClip(const SkIRect& clip) {
|
||||
// conver to scalars, since that's where we'll see the points
|
||||
|
@ -15,6 +15,7 @@
|
||||
SkMMAPStream::SkMMAPStream(const char filename[])
|
||||
{
|
||||
fAddr = NULL; // initialize to failure case
|
||||
fSize = 0;
|
||||
|
||||
int fildes = open(filename, O_RDONLY);
|
||||
if (fildes < 0)
|
||||
|
@ -22,7 +22,9 @@ static inline void clamp_ge(SkScalar& value, SkScalar min) {
|
||||
}
|
||||
}
|
||||
|
||||
SkQuadClipper::SkQuadClipper() {}
|
||||
SkQuadClipper::SkQuadClipper() {
|
||||
fClip.setEmpty();
|
||||
}
|
||||
|
||||
void SkQuadClipper::setClip(const SkIRect& clip) {
|
||||
// conver to scalars, since that's where we'll see the points
|
||||
|
@ -34,6 +34,8 @@ SkPath1DPathEffect::SkPath1DPathEffect(const SkPath& path, SkScalar advance,
|
||||
if (advance <= 0 || path.isEmpty()) {
|
||||
SkDEBUGF(("SkPath1DPathEffect can't use advance <= 0\n"));
|
||||
fAdvance = 0; // signals we can't draw anything
|
||||
fInitialOffset = 0;
|
||||
fStyle = kStyleCount;
|
||||
} else {
|
||||
// cleanup their phase parameter, inverting it so that it becomes an
|
||||
// offset along the path (to match the interpretation in PostScript)
|
||||
@ -142,6 +144,11 @@ SkPath1DPathEffect::SkPath1DPathEffect(SkFlattenableReadBuffer& buffer) {
|
||||
fPath.unflatten(buffer);
|
||||
fInitialOffset = buffer.readScalar();
|
||||
fStyle = (Style) buffer.readU8();
|
||||
} else {
|
||||
SkDEBUGF(("SkPath1DPathEffect can't use advance <= 0\n"));
|
||||
// Make Coverity happy.
|
||||
fInitialOffset = 0;
|
||||
fStyle = kStyleCount;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
SkBlurDrawLooper::SkBlurDrawLooper(SkScalar radius, SkScalar dx, SkScalar dy,
|
||||
SkColor color, uint32_t flags)
|
||||
: fDx(dx), fDy(dy), fBlurColor(color), fBlurFlags(flags) {
|
||||
: fDx(dx), fDy(dy), fBlurColor(color), fBlurFlags(flags), fState(kDone) {
|
||||
|
||||
SkASSERT(flags <= kAll_BlurFlag);
|
||||
if (radius > 0) {
|
||||
|
@ -31,7 +31,8 @@ extern void gr_run_unittests();
|
||||
#define DEBUG_INVAL_START_IDX -1
|
||||
|
||||
GrGpu::GrGpu()
|
||||
: fContext(NULL)
|
||||
: fClipInStencil(false)
|
||||
, fContext(NULL)
|
||||
, fResetTimestamp(kExpiredTimestamp+1)
|
||||
, fVertexPool(NULL)
|
||||
, fIndexPool(NULL)
|
||||
|
@ -295,6 +295,10 @@ static bool Sample_Index_DI(void* SK_RESTRICT dstRow,
|
||||
|
||||
SkScaledBitmapSampler::SkScaledBitmapSampler(int width, int height,
|
||||
int sampleSize) {
|
||||
fCTable = NULL;
|
||||
fDstRow = NULL;
|
||||
fRowProc = NULL;
|
||||
|
||||
if (width <= 0 || height <= 0) {
|
||||
sk_throw();
|
||||
}
|
||||
@ -327,9 +331,6 @@ SkScaledBitmapSampler::SkScaledBitmapSampler(int width, int height,
|
||||
|
||||
SkASSERT(fDX > 0 && (fX0 + fDX * (fScaledWidth - 1)) < width);
|
||||
SkASSERT(fDY > 0 && (fY0 + fDY * (fScaledHeight - 1)) < height);
|
||||
|
||||
fRowProc = NULL;
|
||||
fCTable = NULL;
|
||||
}
|
||||
|
||||
bool SkScaledBitmapSampler::begin(SkBitmap* dst, SrcConfig sc, bool dither,
|
||||
|
Loading…
Reference in New Issue
Block a user