aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/benchmain.cpp2
-rw-r--r--gm/gmmain.cpp4
-rw-r--r--gyp/common_conditions.gypi1
-rw-r--r--include/views/SkWidget.h2
-rw-r--r--samplecode/SampleLines.cpp2
-rw-r--r--samplecode/SampleOvalTest.cpp2
-rw-r--r--samplecode/SamplePathClip.cpp2
-rw-r--r--samplecode/SampleSlides.cpp2
-rw-r--r--samplecode/SampleTextAlpha.cpp2
-rw-r--r--samplecode/SampleUnitMapper.cpp2
-rw-r--r--samplecode/SampleVertices.cpp2
-rw-r--r--src/animator/SkAnimator.cpp4
-rw-r--r--src/animator/SkScriptTokenizer.cpp9
-rw-r--r--src/gpu/gl/GrGLShaderBuilder.cpp4
-rw-r--r--src/gpu/gr_unittests.cpp4
-rw-r--r--src/ports/SkFontHost_fontconfig.cpp1
-rw-r--r--src/views/SkWidgets.cpp2
-rw-r--r--src/views/animated/SkScrollBarView.cpp4
-rw-r--r--src/views/unix/SkOSWindow_Unix.cpp1
19 files changed, 28 insertions, 24 deletions
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 459f34038a..b16cca30cd 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -676,10 +676,10 @@ int tool_main(int argc, char** argv) {
configName = gConfigs[configIndex].fName;
backend = gConfigs[configIndex].fBackend;
GrContext* context = NULL;
- SkGLContextHelper* glContext = NULL;
BenchTimer* timer = timers[configIndex];
#if SK_SUPPORT_GPU
+ SkGLContextHelper* glContext = NULL;
if (kGPU_Backend == backend) {
context = gContextFactory.get(gConfigs[configIndex].fContextType);
if (NULL == context) {
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 26242e63d2..a817a17c86 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -1165,7 +1165,9 @@ int tool_main(int argc, char** argv) {
bool doRTree = true;
bool doTileGrid = true;
bool doVerbose = false;
+#if SK_SUPPORT_GPU
bool disableTextureCache = false;
+#endif
SkTDArray<size_t> configs;
SkTDArray<size_t> excludeConfigs;
SkTDArray<SkScalar> tileGridReplayScales;
@@ -1302,7 +1304,9 @@ int tool_main(int argc, char** argv) {
} else if (strcmp(*argv, "--noserialize") == 0) {
doSerialize = false;
} else if (strcmp(*argv, "--notexturecache") == 0) {
+#if SK_SUPPORT_GPU
disableTextureCache = true;
+#endif
} else if (strcmp(*argv, "--tiledPipe") == 0) {
doTiledPipe = true;
} else if (!strcmp(*argv, "--verbose") || !strcmp(*argv, "-v")) {
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index cfcc7f2c0d..e379f27b9e 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -145,7 +145,6 @@
#'-Werror',
'-Wall',
'-Wextra',
- '-Wno-unused',
# suppressions below here were added for clang
'-Wno-unused-parameter',
'-Wno-c++11-extensions'
diff --git a/include/views/SkWidget.h b/include/views/SkWidget.h
index 3b68e7bc1c..115e9a4cf2 100644
--- a/include/views/SkWidget.h
+++ b/include/views/SkWidget.h
@@ -103,7 +103,7 @@ public:
protected:
virtual bool onEvent(const SkEvent&);
virtual void onDraw(SkCanvas*);
- virtual Click* onFindClickHandler(SkScalar x, SkScalar y);
+ virtual Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE;
virtual bool onClick(Click* click);
private:
diff --git a/samplecode/SampleLines.cpp b/samplecode/SampleLines.cpp
index a9d070ff5e..df35e8681f 100644
--- a/samplecode/SampleLines.cpp
+++ b/samplecode/SampleLines.cpp
@@ -98,7 +98,7 @@ protected:
canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), paint);
}
- virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
+ virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {
fAlpha = SkScalarRound(y);
this->inval(NULL);
return NULL;
diff --git a/samplecode/SampleOvalTest.cpp b/samplecode/SampleOvalTest.cpp
index 5acf568e7b..a105b82801 100644
--- a/samplecode/SampleOvalTest.cpp
+++ b/samplecode/SampleOvalTest.cpp
@@ -101,7 +101,7 @@ protected:
}
}
- virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
+ virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {
this->inval(NULL);
return NULL;
}
diff --git a/samplecode/SamplePathClip.cpp b/samplecode/SamplePathClip.cpp
index b7583ab2f7..04f2cdba6c 100644
--- a/samplecode/SamplePathClip.cpp
+++ b/samplecode/SamplePathClip.cpp
@@ -70,7 +70,7 @@ protected:
canvas->drawOval(oval, p);
}
- virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
+ virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {
return new Click(this);
}
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index 0766d17653..fa948f820a 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -717,7 +717,7 @@ protected:
gProc[fIndex](canvas);
}
- virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
+ virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {
this->init();
fIndex = (fIndex + 1) % SK_ARRAY_COUNT(gProc);
this->inval(NULL);
diff --git a/samplecode/SampleTextAlpha.cpp b/samplecode/SampleTextAlpha.cpp
index 8a248c39e4..59ce1868b0 100644
--- a/samplecode/SampleTextAlpha.cpp
+++ b/samplecode/SampleTextAlpha.cpp
@@ -94,7 +94,7 @@ protected:
}
}
- virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
+ virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {
return new Click(this);
}
diff --git a/samplecode/SampleUnitMapper.cpp b/samplecode/SampleUnitMapper.cpp
index c9a8f9f29a..db9af09f38 100644
--- a/samplecode/SampleUnitMapper.cpp
+++ b/samplecode/SampleUnitMapper.cpp
@@ -141,7 +141,7 @@ protected:
return -1;
}
- virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
+ virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {
fDragIndex = hittest(x, y);
return fDragIndex >= 0 ? new Click(this) : NULL;
}
diff --git a/samplecode/SampleVertices.cpp b/samplecode/SampleVertices.cpp
index 152cb13326..53db2ea3fa 100644
--- a/samplecode/SampleVertices.cpp
+++ b/samplecode/SampleVertices.cpp
@@ -120,7 +120,7 @@ protected:
}
}
- virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
+ virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {
return new Click(this);
}
diff --git a/src/animator/SkAnimator.cpp b/src/animator/SkAnimator.cpp
index 09fccd925d..acbb808c5c 100644
--- a/src/animator/SkAnimator.cpp
+++ b/src/animator/SkAnimator.cpp
@@ -409,9 +409,9 @@ bool SkAnimator::onEvent(const SkEvent& evt) {
#endif
if (evt.isType(SK_EventType_OnEnd)) {
SkEventState eventState;
- bool success = evt.findPtr("anim", (void**) &eventState.fDisplayable);
+ SkDEBUGCODE(bool success =) evt.findPtr("anim", (void**) &eventState.fDisplayable);
SkASSERT(success);
- success = evt.findS32("time", (int32_t*) &fMaker->fEnableTime);
+ SkDEBUGCODE(success =) evt.findS32("time", (int32_t*) &fMaker->fEnableTime);
SkASSERT(success);
fMaker->fAdjustedStart = fMaker->getAppTime() - fMaker->fEnableTime;
fMaker->fEvents.doEvent(*fMaker, SkDisplayEvent::kOnEnd, &eventState);
diff --git a/src/animator/SkScriptTokenizer.cpp b/src/animator/SkScriptTokenizer.cpp
index ca6cab0d34..b11c0a575c 100644
--- a/src/animator/SkScriptTokenizer.cpp
+++ b/src/animator/SkScriptTokenizer.cpp
@@ -603,8 +603,6 @@ scalarCommon:
}
if (ch == '.') {
if (fTokenLength == 0) {
- SkDEBUGCODE(SkScriptValue2 scriptValue;)
- SkDEBUGCODE(scriptValue.fOperand.fObject = NULL);
int tokenLength = token_length(++script);
const char* token = script;
script += tokenLength;
@@ -1273,6 +1271,7 @@ bool SkScriptEngine2::ValueToString(const SkScriptValue2& value, SkString* strin
}
#ifdef SK_DEBUG
+#if defined(SK_SUPPORT_UNITTEST)
#define testInt(expression) { #expression, SkOperand2::kS32, expression, 0, NULL }
#ifdef SK_SCALAR_IS_FLOAT
@@ -1475,6 +1474,7 @@ static const SkScriptNAnswer2 scriptTests[] = {
};
#define SkScriptNAnswer_testCount SK_ARRAY_COUNT(scriptTests)
+#endif // SK_SUPPORT_UNITTEST
void SkScriptEngine2::UnitTest() {
#if defined(SK_SUPPORT_UNITTEST)
@@ -1506,6 +1506,7 @@ void SkScriptEngine2::UnitTest() {
SkASSERT(0);
}
}
-#endif
+#endif // SK_SUPPORT_UNITTEST
}
-#endif
+#endif // SK_DEBUG
+
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index 02d6d383b7..5c3f5b3fe8 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -102,7 +102,7 @@ GrGLShaderBuilder::GrGLShaderBuilder(const GrGLContextInfo& ctxInfo,
}
void GrGLShaderBuilder::codeAppendf(ShaderType type, const char format[], va_list args) {
- SkString* string;
+ SkString* string = NULL;
switch (type) {
case kVertex_ShaderType:
string = &fVSCode;
@@ -120,7 +120,7 @@ void GrGLShaderBuilder::codeAppendf(ShaderType type, const char format[], va_lis
}
void GrGLShaderBuilder::codeAppend(ShaderType type, const char* str) {
- SkString* string;
+ SkString* string = NULL;
switch (type) {
case kVertex_ShaderType:
string = &fVSCode;
diff --git a/src/gpu/gr_unittests.cpp b/src/gpu/gr_unittests.cpp
index c7daf7718f..ab5049a36a 100644
--- a/src/gpu/gr_unittests.cpp
+++ b/src/gpu/gr_unittests.cpp
@@ -17,6 +17,7 @@ void gr_run_unittests();
// If we aren't inheriting these as #defines from elsewhere,
// clang demands they be declared before we #include the template
// that relies on them.
+#if GR_DEBUG
static bool LT(const int& elem, int value) {
return elem < value;
}
@@ -39,6 +40,7 @@ static void test_bsearch() {
}
}
}
+#endif
// bogus empty class for GrBinHashKey
class BogusEntry {};
@@ -72,7 +74,7 @@ static void test_binHashKey()
void gr_run_unittests() {
- test_bsearch();
+ GR_DEBUGCODE(test_bsearch();)
test_binHashKey();
GrRedBlackTree<int>::UnitTest();
GrDrawState::VertexAttributesUnitTest();
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index 438b47d46a..e1db69a4bd 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -249,7 +249,6 @@ SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
static SkStream* open_stream(const FontConfigTypeface* face, int* ttcIndex) {
SkStream* stream = face->getLocalStream();
- int index;
if (stream) {
stream->ref();
// should have been provided by CreateFromStream()
diff --git a/src/views/SkWidgets.cpp b/src/views/SkWidgets.cpp
index 202bf52930..e4547ec0e6 100644
--- a/src/views/SkWidgets.cpp
+++ b/src/views/SkWidgets.cpp
@@ -309,7 +309,7 @@ void SkPushButtonWidget::onDraw(SkCanvas* canvas)
}
}
-SkView::Click* SkPushButtonWidget::onFindClickHandler(SkScalar x, SkScalar y)
+SkView::Click* SkPushButtonWidget::onFindClickHandler(SkScalar x, SkScalar y, unsigned modi)
{
this->acceptFocus();
return new Click(this);
diff --git a/src/views/animated/SkScrollBarView.cpp b/src/views/animated/SkScrollBarView.cpp
index 80ee49fdb3..d78cafafd7 100644
--- a/src/views/animated/SkScrollBarView.cpp
+++ b/src/views/animated/SkScrollBarView.cpp
@@ -122,12 +122,12 @@ void SkScrollBarView::adjust()
int total = fTotalLength;
int start = fStartPoint;
int shown = fShownLength;
- int hideBar = 0;
+// int hideBar = 0;
if (total <= 0 || shown <= 0 || shown >= total) // no bar to show
{
total = 1; // avoid divide-by-zero. should be done by skin/script
- hideBar = 1; // signal we don't want a thumb
+// hideBar = 1; // signal we don't want a thumb
}
else
{
diff --git a/src/views/unix/SkOSWindow_Unix.cpp b/src/views/unix/SkOSWindow_Unix.cpp
index f6e32e42f2..5b6f101914 100644
--- a/src/views/unix/SkOSWindow_Unix.cpp
+++ b/src/views/unix/SkOSWindow_Unix.cpp
@@ -155,7 +155,6 @@ void SkOSWindow::post_linuxevent() {
if (NULL == fUnixWindow.fDisplay) {
return;
}
- long event_mask = NoEventMask;
XClientMessageEvent event;
event.type = ClientMessage;
Atom myAtom(0);