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

Unified Diff: tests/ImageFilterTest.cpp

Issue 1390523005: factories should return baseclass, allowing the impl to specialize (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 2 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 | « src/effects/SkTileImageFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index b1a017cc52c7b20c9400080c725a08aad81b9d24..f83d315c4d4511b62865edff2948451bcb77fb28 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -354,16 +354,11 @@ static SkBitmap make_gradient_circle(int width, int height) {
static void test_negative_blur_sigma(SkImageFilter::Proxy* proxy, skiatest::Reporter* reporter) {
// Check that SkBlurImageFilter will accept a negative sigma, either in
// the given arguments or after CTM application.
- int width = 32, height = 32;
- SkScalar five = SkIntToScalar(5);
+ const int width = 32, height = 32;
+ const SkScalar five = SkIntToScalar(5);
- SkAutoTUnref<SkBlurImageFilter> positiveFilter(
- SkBlurImageFilter::Create(five, five)
- );
-
- SkAutoTUnref<SkBlurImageFilter> negativeFilter(
- SkBlurImageFilter::Create(-five, five)
- );
+ SkAutoTUnref<SkImageFilter> positiveFilter(SkBlurImageFilter::Create(five, five));
+ SkAutoTUnref<SkImageFilter> negativeFilter(SkBlurImageFilter::Create(-five, five));
SkBitmap gradient = make_gradient_circle(width, height);
SkBitmap positiveResult1, negativeResult1;
@@ -422,9 +417,9 @@ DEF_TEST(ImageFilterDrawTiled, reporter) {
SkIntToScalar( 1), SkIntToScalar(-7), SkIntToScalar( 1),
SkIntToScalar( 1), SkIntToScalar( 1), SkIntToScalar( 1),
};
- SkISize kernelSize = SkISize::Make(3, 3);
- SkScalar gain = SK_Scalar1, bias = 0;
- SkScalar five = SkIntToScalar(5);
+ const SkISize kernelSize = SkISize::Make(3, 3);
+ const SkScalar gain = SK_Scalar1, bias = 0;
+ const SkScalar five = SkIntToScalar(5);
SkAutoTUnref<SkImage> gradientImage(SkImage::NewFromBitmap(make_gradient_circle(64, 64)));
SkAutoTUnref<SkImageFilter> gradientSource(SkImageSource::Create(gradientImage));
@@ -489,7 +484,7 @@ DEF_TEST(ImageFilterDrawTiled, reporter) {
};
SkBitmap untiledResult, tiledResult;
- int width = 64, height = 64;
+ const int width = 64, height = 64;
untiledResult.allocN32Pixels(width, height);
tiledResult.allocN32Pixels(width, height);
SkCanvas tiledCanvas(tiledResult);
« no previous file with comments | « src/effects/SkTileImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698