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

Side by Side Diff: include/core/SkImageFilter.h

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Serialization with strings as ID Created 7 years, 2 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 | Annotate | Revision Log
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 #ifndef SkImageFilter_DEFINED 8 #ifndef SkImageFilter_DEFINED
9 #define SkImageFilter_DEFINED 9 #define SkImageFilter_DEFINED
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 * Returns the crop rectangle of this filter. This is set at construction 133 * Returns the crop rectangle of this filter. This is set at construction
134 * time, and determines which pixels from the input image will 134 * time, and determines which pixels from the input image will
135 * be processed. The size of this rectangle should be used as the size 135 * be processed. The size of this rectangle should be used as the size
136 * of the destination image. The origin of this rect should be used to 136 * of the destination image. The origin of this rect should be used to
137 * offset access to the input images, and should also be added to the 137 * offset access to the input images, and should also be added to the
138 * "offset" parameter in onFilterImage and filterImageGPU(). (The latter 138 * "offset" parameter in onFilterImage and filterImageGPU(). (The latter
139 * ensures that the resulting buffer is drawn in the correct location.) 139 * ensures that the resulting buffer is drawn in the correct location.)
140 */ 140 */
141 const SkIRect& cropRect() const { return fCropRect; } 141 const SkIRect& cropRect() const { return fCropRect; }
142 142
143 SK_DEFINE_FLATTENABLE_TYPE(SkImageFilter)
144
143 protected: 145 protected:
144 SkImageFilter(int inputCount, SkImageFilter** inputs, const SkIRect* cropRec t = NULL); 146 SkImageFilter(int inputCount, SkImageFilter** inputs, const SkIRect* cropRec t = NULL);
145 147
146 // Convenience constructor for 1-input filters. 148 // Convenience constructor for 1-input filters.
147 explicit SkImageFilter(SkImageFilter* input, const SkIRect* cropRect = NULL) ; 149 explicit SkImageFilter(SkImageFilter* input, const SkIRect* cropRect = NULL) ;
148 150
149 // Convenience constructor for 2-input filters. 151 // Convenience constructor for 2-input filters.
150 SkImageFilter(SkImageFilter* input1, SkImageFilter* input2, const SkIRect* c ropRect = NULL); 152 SkImageFilter(SkImageFilter* input1, SkImageFilter* input2, const SkIRect* c ropRect = NULL);
151 153
152 virtual ~SkImageFilter(); 154 virtual ~SkImageFilter();
(...skipping 14 matching lines...) Expand all
167 bool applyCropRect(SkIRect* rect, const SkMatrix& matrix) const; 169 bool applyCropRect(SkIRect* rect, const SkMatrix& matrix) const;
168 170
169 private: 171 private:
170 typedef SkFlattenable INHERITED; 172 typedef SkFlattenable INHERITED;
171 int fInputCount; 173 int fInputCount;
172 SkImageFilter** fInputs; 174 SkImageFilter** fInputs;
173 SkIRect fCropRect; 175 SkIRect fCropRect;
174 }; 176 };
175 177
176 #endif 178 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698