Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1774)

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 24246006: Fixed warnings as error (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFilterFuzz.cpp
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 46569efaab5caf1869c72d3331bfa285347528d6..260a1a6e30271f2ff3d3c75229f8ae96b82707f9 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -228,9 +228,9 @@ static SkImageFilter* make_image_filter(bool canBeNull = true) {
{
SkAutoTUnref<SkShader> shader((R(2) == 1) ?
SkPerlinNoiseShader::CreateFractalNoise(
- make_scalar(true), make_scalar(true), SkIntToScalar(R(10)), make_scalar()) :
+ make_scalar(true), make_scalar(true), R(10.0f), make_scalar()) :
SkPerlinNoiseShader::CreateTubulence(
- make_scalar(true), make_scalar(true), SkIntToScalar(R(10)), make_scalar()));
+ make_scalar(true), make_scalar(true), R(10.0f), make_scalar()));
filter = SkRectShaderImageFilter::Create(shader, SkRect::MakeWH(kBitmapSize, kBitmapSize));
}
break;
@@ -240,11 +240,11 @@ static SkImageFilter* make_image_filter(bool canBeNull = true) {
break;
case MORPHOLOGY:
if (R(2) == 1)
- filter = new SkDilateImageFilter(SkIntToScalar(R(kBitmapSize)),
- SkIntToScalar(R(kBitmapSize)), make_image_filter());
+ filter = new SkDilateImageFilter(R(static_cast<float>(kBitmapSize)),
+ R(static_cast<float>(kBitmapSize)), make_image_filter());
else
- filter = new SkErodeImageFilter(SkIntToScalar(R(kBitmapSize)),
- SkIntToScalar(R(kBitmapSize)), make_image_filter());
+ filter = new SkErodeImageFilter(R(static_cast<float>(kBitmapSize)),
+ R(static_cast<float>(kBitmapSize)), make_image_filter());
break;
case BITMAP:
filter = new SkBitmapSource(make_bitmap());
@@ -260,7 +260,7 @@ static SkImageFilter* make_image_filter(bool canBeNull = true) {
return (filter || canBeNull) ? filter : make_image_filter(canBeNull);
}
-void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) {
+static void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) {
canvas->save();
canvas->clipRect(SkRect::MakeXYWH(SkIntToScalar(x), SkIntToScalar(y),
SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698