aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-28 20:29:38 +0000
committerGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-28 20:29:38 +0000
commita728e35edcffd99216e3965a4b908ad0df7f69c2 (patch)
treef9c2668a0aeae6d649bfcdd86d275edbb548dfed /src/core
parent802eee956c0dcc0c30f29911b9254d1dcd92088e (diff)
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
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkBitmapSampler.cpp2
-rw-r--r--src/core/SkCubicClipper.cpp4
-rw-r--r--src/core/SkMMapStream.cpp1
-rw-r--r--src/core/SkQuadClipper.cpp4
4 files changed, 9 insertions, 2 deletions
diff --git a/src/core/SkBitmapSampler.cpp b/src/core/SkBitmapSampler.cpp
index 37cbc5a058..4c05be27c4 100644
--- a/src/core/SkBitmapSampler.cpp
+++ b/src/core/SkBitmapSampler.cpp
@@ -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)
{
}
diff --git a/src/core/SkCubicClipper.cpp b/src/core/SkCubicClipper.cpp
index 662591fe2b..3db2feb34c 100644
--- a/src/core/SkCubicClipper.cpp
+++ b/src/core/SkCubicClipper.cpp
@@ -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
diff --git a/src/core/SkMMapStream.cpp b/src/core/SkMMapStream.cpp
index 0aec5e19d2..1579044dc8 100644
--- a/src/core/SkMMapStream.cpp
+++ b/src/core/SkMMapStream.cpp
@@ -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)
diff --git a/src/core/SkQuadClipper.cpp b/src/core/SkQuadClipper.cpp
index b79d5a2497..0c9c9add09 100644
--- a/src/core/SkQuadClipper.cpp
+++ b/src/core/SkQuadClipper.cpp
@@ -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