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

Side by Side Diff: gm/imagefiltersgraph.cpp

Issue 1834303003: Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 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
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | include/core/SkColorFilter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 7
8 #include "gm.h" 8 #include "gm.h"
9 9
10 #include "SkArithmeticMode.h" 10 #include "SkArithmeticMode.h"
(...skipping 14 matching lines...) Expand all
25 #include "SkXfermodeImageFilter.h" 25 #include "SkXfermodeImageFilter.h"
26 26
27 // More closely models how Blink's OffsetFilter works as of 10/23/13. SkOffsetIm ageFilter doesn't 27 // More closely models how Blink's OffsetFilter works as of 10/23/13. SkOffsetIm ageFilter doesn't
28 // perform a draw and this one does. 28 // perform a draw and this one does.
29 class SimpleOffsetFilter : public SkImageFilter { 29 class SimpleOffsetFilter : public SkImageFilter {
30 public: 30 public:
31 class Registrar { 31 class Registrar {
32 public: 32 public:
33 Registrar() { 33 Registrar() {
34 SkFlattenable::Register("SimpleOffsetFilter", 34 SkFlattenable::Register("SimpleOffsetFilter",
35 SimpleOffsetFilter::CreateProc, 35 SimpleOffsetFilter::CreateProc);
36 SimpleOffsetFilter::GetFlattenableType());
37 } 36 }
38 }; 37 };
39 static sk_sp<SkImageFilter> Make(SkScalar dx, SkScalar dy, sk_sp<SkImageFilt er> input) { 38 static sk_sp<SkImageFilter> Make(SkScalar dx, SkScalar dy, sk_sp<SkImageFilt er> input) {
40 return sk_sp<SkImageFilter>(new SimpleOffsetFilter(dx, dy, std::move(inp ut))); 39 return sk_sp<SkImageFilter>(new SimpleOffsetFilter(dx, dy, std::move(inp ut)));
41 } 40 }
42 41
43 SK_TO_STRING_OVERRIDE() 42 SK_TO_STRING_OVERRIDE()
44 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter); 43 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter);
45 44
46 protected: 45 protected:
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 257 }
259 258
260 sk_sp<SkImage> fImage; 259 sk_sp<SkImage> fImage;
261 260
262 typedef GM INHERITED; 261 typedef GM INHERITED;
263 }; 262 };
264 263
265 /////////////////////////////////////////////////////////////////////////////// 264 ///////////////////////////////////////////////////////////////////////////////
266 265
267 DEF_GM(return new ImageFiltersGraphGM;) 266 DEF_GM(return new ImageFiltersGraphGM;)
OLDNEW
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | include/core/SkColorFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698