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

Side by Side Diff: gm/imagefiltersbase.cpp

Issue 1709753002: Mark existing image filter entry points that will be going away with Deprecated (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 4 years, 10 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 | « no previous file | gm/imagefiltersgraph.cpp » ('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 2011 Google Inc. 2 * Copyright 2011 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 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 }; 28 };
29 static FailImageFilter* Create() { return new FailImageFilter; } 29 static FailImageFilter* Create() { return new FailImageFilter; }
30 30
31 SK_TO_STRING_OVERRIDE() 31 SK_TO_STRING_OVERRIDE()
32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(FailImageFilter) 32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(FailImageFilter)
33 33
34 protected: 34 protected:
35 FailImageFilter() : INHERITED(0, nullptr) {} 35 FailImageFilter() : INHERITED(0, nullptr) {}
36 36
37 bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 37 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&,
38 SkBitmap* result, SkIPoint* offset) const override { 38 SkBitmap* result, SkIPoint* offset) const overr ide {
39 return false; 39 return false;
40 } 40 }
41 41
42 private: 42 private:
43 typedef SkImageFilter INHERITED; 43 typedef SkImageFilter INHERITED;
44 }; 44 };
45 45
46 static FailImageFilter::Registrar gReg0; 46 static FailImageFilter::Registrar gReg0;
47 47
48 SkFlattenable* FailImageFilter::CreateProc(SkReadBuffer& buffer) { 48 SkFlattenable* FailImageFilter::CreateProc(SkReadBuffer& buffer) {
(...skipping 20 matching lines...) Expand all
69 }; 69 };
70 static IdentityImageFilter* Create(SkImageFilter* input = nullptr) { 70 static IdentityImageFilter* Create(SkImageFilter* input = nullptr) {
71 return new IdentityImageFilter(input); 71 return new IdentityImageFilter(input);
72 } 72 }
73 73
74 SK_TO_STRING_OVERRIDE() 74 SK_TO_STRING_OVERRIDE()
75 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(IdentityImageFilter) 75 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(IdentityImageFilter)
76 protected: 76 protected:
77 IdentityImageFilter(SkImageFilter* input) : INHERITED(1, &input) {} 77 IdentityImageFilter(SkImageFilter* input) : INHERITED(1, &input) {}
78 78
79 bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 79 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&,
80 SkBitmap* result, SkIPoint* offset) const override { 80 SkBitmap* result, SkIPoint* offset) const overr ide {
81 *result = src; 81 *result = src;
82 offset->set(0, 0); 82 offset->set(0, 0);
83 return true; 83 return true;
84 } 84 }
85 85
86 private: 86 private:
87 typedef SkImageFilter INHERITED; 87 typedef SkImageFilter INHERITED;
88 }; 88 };
89 89
90 static IdentityImageFilter::Registrar gReg1; 90 static IdentityImageFilter::Registrar gReg1;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 class ImageFiltersText_CF : public ImageFiltersTextBaseGM { 318 class ImageFiltersText_CF : public ImageFiltersTextBaseGM {
319 public: 319 public:
320 ImageFiltersText_CF() : ImageFiltersTextBaseGM("color") {} 320 ImageFiltersText_CF() : ImageFiltersTextBaseGM("color") {}
321 321
322 void installFilter(SkPaint* paint) override { 322 void installFilter(SkPaint* paint) override {
323 paint->setColorFilter(SkColorFilter::CreateModeFilter(SK_ColorBLUE, SkXf ermode::kSrcIn_Mode))->unref(); 323 paint->setColorFilter(SkColorFilter::CreateModeFilter(SK_ColorBLUE, SkXf ermode::kSrcIn_Mode))->unref();
324 } 324 }
325 }; 325 };
326 DEF_GM( return new ImageFiltersText_CF; ) 326 DEF_GM( return new ImageFiltersText_CF; )
327 327
OLDNEW
« no previous file with comments | « no previous file | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698