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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 138063005: Serialization of SkPictureImageFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "SampleCode.h" 7 #include "SampleCode.h"
8 #include "SkBicubicImageFilter.h" 8 #include "SkBicubicImageFilter.h"
9 #include "SkBitmapDevice.h" 9 #include "SkBitmapDevice.h"
10 #include "SkBitmapSource.h" 10 #include "SkBitmapSource.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 break; 252 break;
253 case MORPHOLOGY: 253 case MORPHOLOGY:
254 if (R(2) == 1) 254 if (R(2) == 1)
255 filter = new SkDilateImageFilter(R(static_cast<float>(kBitmapSize)), 255 filter = new SkDilateImageFilter(R(static_cast<float>(kBitmapSize)),
256 R(static_cast<float>(kBitmapSize)), make_image_filter()); 256 R(static_cast<float>(kBitmapSize)), make_image_filter());
257 else 257 else
258 filter = new SkErodeImageFilter(R(static_cast<float>(kBitmapSize)), 258 filter = new SkErodeImageFilter(R(static_cast<float>(kBitmapSize)),
259 R(static_cast<float>(kBitmapSize)), make_image_filter()); 259 R(static_cast<float>(kBitmapSize)), make_image_filter());
260 break; 260 break;
261 case BITMAP: 261 case BITMAP:
262 filter = new SkBitmapSource(make_bitmap()); 262 filter = new SkBitmapSource(make_bitmap(), make_rect(), make_rect());
Stephen White 2014/01/15 14:59:02 This should probably be landed separately from thi
sugoi 2014/01/15 16:49:22 Done. (see https://codereview.chromium.org/1396130
263 break; 263 break;
264 case DISPLACE: 264 case DISPLACE:
265 filter = new SkDisplacementMapEffect(make_channel_selector_type(), 265 filter = new SkDisplacementMapEffect(make_channel_selector_type(),
266 make_channel_selector_type(), make_scalar(), 266 make_channel_selector_type(), make_scalar(),
267 make_image_filter(false), make_image_filter()); 267 make_image_filter(false), make_image_filter());
268 break; 268 break;
269 case TILE: 269 case TILE:
270 filter = new SkTileImageFilter(make_rect(), make_rect(), make_image_filt er(false)); 270 filter = new SkTileImageFilter(make_rect(), make_rect(), make_image_filt er(false));
271 break; 271 break;
272 default: 272 default:
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 366
367 private: 367 private:
368 typedef SkView INHERITED; 368 typedef SkView INHERITED;
369 }; 369 };
370 370
371 ////////////////////////////////////////////////////////////////////////////// 371 //////////////////////////////////////////////////////////////////////////////
372 372
373 static SkView* MyFactory() { return new ImageFilterFuzzView; } 373 static SkView* MyFactory() { return new ImageFilterFuzzView; }
374 static SkViewRegister reg(MyFactory); 374 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPicture.cpp » ('j') | src/core/SkPicture.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698