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

Side by Side Diff: gm/imagefiltersgraph.cpp

Issue 376953003: Clean up SkImageFilter constructors. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed 100-col issues Created 6 years, 5 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/SkImageFilter.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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { 66 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE {
67 this->SkImageFilter::flatten(buffer); 67 this->SkImageFilter::flatten(buffer);
68 buffer.writeScalar(fDX); 68 buffer.writeScalar(fDX);
69 buffer.writeScalar(fDY); 69 buffer.writeScalar(fDY);
70 } 70 }
71 71
72 private: 72 private:
73 SimpleOffsetFilter(SkScalar dx, SkScalar dy, SkImageFilter* input) 73 SimpleOffsetFilter(SkScalar dx, SkScalar dy, SkImageFilter* input)
74 : SkImageFilter(input), fDX(dx), fDY(dy) {} 74 : SkImageFilter(1, &input), fDX(dx), fDY(dy) {}
75 75
76 SkScalar fDX, fDY; 76 SkScalar fDX, fDY;
77 }; 77 };
78 78
79 SkFlattenable::Registrar registrar("SimpleOffsetFilter", 79 SkFlattenable::Registrar registrar("SimpleOffsetFilter",
80 SimpleOffsetFilter::CreateProc, 80 SimpleOffsetFilter::CreateProc,
81 SimpleOffsetFilter::GetFlattenableType()); 81 SimpleOffsetFilter::GetFlattenableType());
82 82
83 class ImageFiltersGraphGM : public skiagm::GM { 83 class ImageFiltersGraphGM : public skiagm::GM {
84 public: 84 public:
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 private: 210 private:
211 typedef GM INHERITED; 211 typedef GM INHERITED;
212 SkBitmap fBitmap; 212 SkBitmap fBitmap;
213 }; 213 };
214 214
215 /////////////////////////////////////////////////////////////////////////////// 215 ///////////////////////////////////////////////////////////////////////////////
216 216
217 static skiagm::GM* MyFactory(void*) { return new ImageFiltersGraphGM; } 217 static skiagm::GM* MyFactory(void*) { return new ImageFiltersGraphGM; }
218 static skiagm::GMRegistry reg(MyFactory); 218 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | include/core/SkImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698