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

Side by Side Diff: gm/imagefiltersgraph.cpp

Issue 1834303003: 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
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 13 matching lines...) Expand all
24 #include "SkXfermodeImageFilter.h" 24 #include "SkXfermodeImageFilter.h"
25 25
26 // More closely models how Blink's OffsetFilter works as of 10/23/13. SkOffsetIm ageFilter doesn't 26 // More closely models how Blink's OffsetFilter works as of 10/23/13. SkOffsetIm ageFilter doesn't
27 // perform a draw and this one does. 27 // perform a draw and this one does.
28 class SimpleOffsetFilter : public SkImageFilter { 28 class SimpleOffsetFilter : public SkImageFilter {
29 public: 29 public:
30 class Registrar { 30 class Registrar {
31 public: 31 public:
32 Registrar() { 32 Registrar() {
33 SkFlattenable::Register("SimpleOffsetFilter", 33 SkFlattenable::Register("SimpleOffsetFilter",
34 SimpleOffsetFilter::CreateProc, 34 SimpleOffsetFilter::CreateProc);
35 SimpleOffsetFilter::GetFlattenableType());
36 } 35 }
37 }; 36 };
38 static SkImageFilter* Create(SkScalar dx, SkScalar dy, SkImageFilter* input) { 37 static SkImageFilter* Create(SkScalar dx, SkScalar dy, SkImageFilter* input) {
39 return new SimpleOffsetFilter(dx, dy, input); 38 return new SimpleOffsetFilter(dx, dy, input);
40 } 39 }
41 40
42 bool onFilterImageDeprecated(Proxy* proxy, const SkBitmap& src, const Contex t& ctx, 41 bool onFilterImageDeprecated(Proxy* proxy, const SkBitmap& src, const Contex t& ctx,
43 SkBitmap* dst, SkIPoint* offset) const override { 42 SkBitmap* dst, SkIPoint* offset) const override {
44 SkBitmap source = src; 43 SkBitmap source = src;
45 SkIPoint srcOffset = SkIPoint::Make(0, 0); 44 SkIPoint srcOffset = SkIPoint::Make(0, 0);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 242 }
244 243
245 sk_sp<SkImage> fImage; 244 sk_sp<SkImage> fImage;
246 245
247 typedef GM INHERITED; 246 typedef GM INHERITED;
248 }; 247 };
249 248
250 /////////////////////////////////////////////////////////////////////////////// 249 ///////////////////////////////////////////////////////////////////////////////
251 250
252 DEF_GM(return new ImageFiltersGraphGM;) 251 DEF_GM(return new ImageFiltersGraphGM;)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698