aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-12 21:23:49 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-12 21:23:49 +0000
commit4bdfb8c9d6482a56c7212034a6f73046227ed023 (patch)
tree3647172cc2b13df5364997aaa609b2870709551e
parent51c62a6cfadc302bb65bb5a98e358c93223dc73f (diff)
Compiler complaints + some minor cleanup
-rw-r--r--bench/MorphologyBench.cpp6
-rw-r--r--gm/twopointradial.cpp5
-rw-r--r--include/core/SkFlattenable.h2
-rw-r--r--src/core/SkColorTable.cpp2
-rw-r--r--src/core/SkOrderedReadBuffer.cpp3
-rw-r--r--src/core/SkOrderedWriteBuffer.cpp12
-rw-r--r--src/utils/SkLayer.cpp2
-rw-r--r--src/views/unix/SkOSWindow_Unix.cpp3
8 files changed, 19 insertions, 16 deletions
diff --git a/bench/MorphologyBench.cpp b/bench/MorphologyBench.cpp
index a0fde55cd0..f41e79c24c 100644
--- a/bench/MorphologyBench.cpp
+++ b/bench/MorphologyBench.cpp
@@ -69,10 +69,12 @@ protected:
SkMorphologyImageFilter* mf = NULL;
switch (fStyle) {
case kDilate_MT:
- mf = new SkDilateImageFilter(fRadius, fRadius);
+ mf = new SkDilateImageFilter(SkScalarFloorToInt(fRadius),
+ SkScalarFloorToInt(fRadius));
break;
case kErode_MT:
- mf = new SkErodeImageFilter(fRadius, fRadius);
+ mf = new SkErodeImageFilter(SkScalarFloorToInt(fRadius),
+ SkScalarFloorToInt(fRadius));
break;
}
paint.setImageFilter(mf)->unref();
diff --git a/gm/twopointradial.cpp b/gm/twopointradial.cpp
index 52e338d984..221c713b30 100644
--- a/gm/twopointradial.cpp
+++ b/gm/twopointradial.cpp
@@ -69,7 +69,10 @@ protected:
if (false) {
SkPaint paint;
paint.setColor(SK_ColorBLUE);
- canvas->drawRect(SkRect::MakeWH(this->getISize().fWidth, this->getISize().fHeight), paint);
+ canvas->drawRect(
+ SkRect::MakeWH(SkIntToScalar(this->getISize().fWidth),
+ SkIntToScalar(this->getISize().fHeight)),
+ paint);
}
SkPaint paint;
const int R0 = 20;
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h
index c33ff67ddd..57019670fe 100644
--- a/include/core/SkFlattenable.h
+++ b/include/core/SkFlattenable.h
@@ -19,7 +19,7 @@ class SkBitmap;
class SkFlattenableReadBuffer;
class SkFlattenableWriteBuffer;
class SkPath;
-class SkPoint;
+struct SkPoint;
class SkString;
#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
diff --git a/src/core/SkColorTable.cpp b/src/core/SkColorTable.cpp
index 0aa13704f7..921d6595b5 100644
--- a/src/core/SkColorTable.cpp
+++ b/src/core/SkColorTable.cpp
@@ -27,7 +27,7 @@ SkColorTable::SkColorTable(int count)
SkDEBUGCODE(f16BitCacheLockCount = 0;)
}
-SkColorTable::SkColorTable(const SkColorTable& src) : INHERITED() {
+SkColorTable::SkColorTable(const SkColorTable& src) {
f16BitCache = NULL;
fFlags = src.fFlags;
int count = src.count();
diff --git a/src/core/SkOrderedReadBuffer.cpp b/src/core/SkOrderedReadBuffer.cpp
index e3a56dbb07..62404a1d48 100644
--- a/src/core/SkOrderedReadBuffer.cpp
+++ b/src/core/SkOrderedReadBuffer.cpp
@@ -10,8 +10,7 @@
#include "SkTypeface.h"
-SkOrderedReadBuffer::SkOrderedReadBuffer(const void* data, size_t size)
- : INHERITED() {
+SkOrderedReadBuffer::SkOrderedReadBuffer(const void* data, size_t size) {
fReader.setMemory(data, size);
}
diff --git a/src/core/SkOrderedWriteBuffer.cpp b/src/core/SkOrderedWriteBuffer.cpp
index 33ee98a8bc..3fa9706023 100644
--- a/src/core/SkOrderedWriteBuffer.cpp
+++ b/src/core/SkOrderedWriteBuffer.cpp
@@ -9,14 +9,14 @@
#include "SkOrderedWriteBuffer.h"
#include "SkTypeface.h"
-SkOrderedWriteBuffer::SkOrderedWriteBuffer(size_t minSize) :
- INHERITED(),
- fWriter(minSize) {
+SkOrderedWriteBuffer::SkOrderedWriteBuffer(size_t minSize)
+ : fWriter(minSize) {
}
-SkOrderedWriteBuffer::SkOrderedWriteBuffer(size_t minSize, void* storage, size_t storageSize) :
- INHERITED(),
- fWriter(minSize, storage, storageSize) {
+SkOrderedWriteBuffer::SkOrderedWriteBuffer(size_t minSize,
+ void* storage,
+ size_t storageSize)
+ : fWriter(minSize, storage, storageSize) {
}
void SkOrderedWriteBuffer::writeFlattenable(SkFlattenable* flattenable) {
diff --git a/src/utils/SkLayer.cpp b/src/utils/SkLayer.cpp
index aaca786080..a311cef3b5 100644
--- a/src/utils/SkLayer.cpp
+++ b/src/utils/SkLayer.cpp
@@ -34,7 +34,7 @@ SkLayer::SkLayer() {
#endif
}
-SkLayer::SkLayer(const SkLayer& src) : INHERITED() {
+SkLayer::SkLayer(const SkLayer& src) {
fParent = NULL;
m_opacity = src.m_opacity;
m_size = src.m_size;
diff --git a/src/views/unix/SkOSWindow_Unix.cpp b/src/views/unix/SkOSWindow_Unix.cpp
index c8fc2c7084..f2e3541b9c 100644
--- a/src/views/unix/SkOSWindow_Unix.cpp
+++ b/src/views/unix/SkOSWindow_Unix.cpp
@@ -33,8 +33,7 @@ const long EVENT_MASK = StructureNotifyMask|ButtonPressMask|ButtonReleaseMask
|ExposureMask|PointerMotionMask|KeyPressMask|KeyReleaseMask;
SkOSWindow::SkOSWindow(void* unused)
- : INHERITED()
- , fVi(NULL)
+ : fVi(NULL)
, fMSAASampleCount(0) {
fUnixWindow.fDisplay = NULL;
fUnixWindow.fGLContext = NULL;