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

Side by Side Diff: gm/imagefiltersgraph.cpp

Issue 1853383002: Revert of Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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());
36 } 37 }
37 }; 38 };
38 static sk_sp<SkImageFilter> Make(SkScalar dx, SkScalar dy, sk_sp<SkImageFilt er> input) { 39 static sk_sp<SkImageFilter> Make(SkScalar dx, SkScalar dy, sk_sp<SkImageFilt er> input) {
39 return sk_sp<SkImageFilter>(new SimpleOffsetFilter(dx, dy, std::move(inp ut))); 40 return sk_sp<SkImageFilter>(new SimpleOffsetFilter(dx, dy, std::move(inp ut)));
40 } 41 }
41 42
42 SK_TO_STRING_OVERRIDE() 43 SK_TO_STRING_OVERRIDE()
43 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter); 44 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter);
44 45
45 protected: 46 protected:
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 254 }
254 255
255 sk_sp<SkImage> fImage; 256 sk_sp<SkImage> fImage;
256 257
257 typedef GM INHERITED; 258 typedef GM INHERITED;
258 }; 259 };
259 260
260 /////////////////////////////////////////////////////////////////////////////// 261 ///////////////////////////////////////////////////////////////////////////////
261 262
262 DEF_GM(return new ImageFiltersGraphGM;) 263 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