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

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 298093006: Fixing windows warnings (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 11a5ec12e34c5ded3c86b83eac4f863494a0036b..0cba43c2669b5b0d526d98c21b3ca10395c12b24 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -100,10 +100,10 @@ static SkRect make_rect() {
}
static SkRegion make_region() {
- SkIRect iRegion = SkIRect::MakeXYWH(SkIntToScalar(R(static_cast<float>(kBitmapSize))),
- SkIntToScalar(R(static_cast<float>(kBitmapSize))),
- SkIntToScalar(R(static_cast<float>(kBitmapSize))),
- SkIntToScalar(R(static_cast<float>(kBitmapSize))));
+ SkIRect iRegion = SkIRect::MakeXYWH(R(static_cast<float>(kBitmapSize)),
+ R(static_cast<float>(kBitmapSize)),
+ R(static_cast<float>(kBitmapSize)),
+ R(static_cast<float>(kBitmapSize)));
return SkRegion(iRegion);
}
@@ -293,7 +293,8 @@ static SkImageFilter* make_image_filter(bool canBeNull = true) {
for (int i = 0; i < arraySize; ++i) {
kernel.push_back() = make_scalar();
}
- SkIPoint kernelOffset = SkIPoint::Make(R(size.width()), R(size.height()));
+ SkIPoint kernelOffset = SkIPoint::Make(R(SkIntToScalar(size.width())),
+ R(SkIntToScalar(size.height())));
filter = SkMatrixConvolutionImageFilter::Create(size,
kernel.begin(),
make_scalar(),
« 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