Misc: Don't run etc1 bench with invalid image and fix VS2015 build warning
Review URL: https://codereview.chromium.org/1409993003
diff --git a/bench/ETCBitmapBench.cpp b/bench/ETCBitmapBench.cpp
index d4068ca..fe6fe06 100644
--- a/bench/ETCBitmapBench.cpp
+++ b/bench/ETCBitmapBench.cpp
@@ -123,7 +123,7 @@
: fDecompress(decompress), fBackend(backend) { }
bool isSuitableFor(Backend backend) override {
- return backend == this->fBackend;
+ return SkToBool(fImage) && backend == this->fBackend;
}
protected:
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp
index 9a667b4..e2bc0fc 100644
--- a/tools/sk_tool_utils.cpp
+++ b/tools/sk_tool_utils.cpp
@@ -352,7 +352,7 @@
static float gaussian2d_value(int x, int y, float sigma) {
// don't bother with the scale term since we're just going to normalize the
// kernel anyways
- float temp = exp(-(x*x + y*y)/(2*sigma*sigma));
+ float temp = expf(-(x*x + y*y)/(2*sigma*sigma));
return temp;
}