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

Unified Diff: gm/imagefilterscropped.cpp

Issue 20315002: Transpose the samples in imagefilterscropped, and add a 1x1 blur. The latter (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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: gm/imagefilterscropped.cpp
diff --git a/gm/imagefilterscropped.cpp b/gm/imagefilterscropped.cpp
index f6045f61a4453d02f78df0bd3fc13ee175201573..b21131c362241b5aa49596d4b05cbefd43febf52 100644
--- a/gm/imagefilterscropped.cpp
+++ b/gm/imagefilterscropped.cpp
@@ -107,7 +107,7 @@ protected:
return SkString("imagefilterscropped");
}
- virtual SkISize onISize() { return SkISize::Make(700, 460); }
+ virtual SkISize onISize() { return SkISize::Make(400, 640); }
void draw_frame(SkCanvas* canvas, const SkRect& r) {
SkPaint paint;
@@ -137,6 +137,7 @@ protected:
SkImageFilter* filters[] = {
NULL,
SkColorFilterImageFilter::Create(cf, NULL, &cropRect),
+ new SkBlurImageFilter(1.0f, 1.0f, NULL, &cropRect),
new SkBlurImageFilter(8.0f, 0.0f, NULL, &cropRect),
new SkBlurImageFilter(0.0f, 8.0f, NULL, &cropRect),
new SkBlurImageFilter(8.0f, 8.0f, NULL, &cropRect),
@@ -151,9 +152,9 @@ protected:
SkScalar DY = r.height() + MARGIN;
canvas->translate(MARGIN, MARGIN);
- for (size_t i = 0; i < SK_ARRAY_COUNT(filters); ++i) {
+ for (size_t j = 0; j < SK_ARRAY_COUNT(drawProc); ++j) {
canvas->save();
- for (size_t j = 0; j < SK_ARRAY_COUNT(drawProc); ++j) {
+ for (size_t i = 0; i < SK_ARRAY_COUNT(filters); ++i) {
drawProc[j](canvas, r, filters[i]);
canvas->translate(0, DY);
}
« 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