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

Side by Side Diff: gm/imagefiltersgraph.cpp

Issue 83343003: Adding more validation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixed comments Created 7 years 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
« 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 *dst = device->accessBitmap(false); 51 *dst = device->accessBitmap(false);
52 offset->fX += bounds.left(); 52 offset->fX += bounds.left();
53 offset->fY += bounds.top(); 53 offset->fY += bounds.top();
54 return true; 54 return true;
55 } 55 }
56 56
57 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter); 57 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter);
58 58
59 protected: 59 protected:
60 explicit SimpleOffsetFilter(SkFlattenableReadBuffer& buffer) 60 explicit SimpleOffsetFilter(SkFlattenableReadBuffer& buffer)
61 : SkImageFilter(buffer) { 61 : SkImageFilter(1, buffer) {
62 fDX = buffer.readScalar(); 62 fDX = buffer.readScalar();
63 fDY = buffer.readScalar(); 63 fDY = buffer.readScalar();
64 } 64 }
65 65
66 virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE { 66 virtual void flatten(SkFlattenableWriteBuffer& 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
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 private: 187 private:
188 typedef GM INHERITED; 188 typedef GM INHERITED;
189 SkBitmap fBitmap; 189 SkBitmap fBitmap;
190 bool fInitialized; 190 bool fInitialized;
191 }; 191 };
192 192
193 /////////////////////////////////////////////////////////////////////////////// 193 ///////////////////////////////////////////////////////////////////////////////
194 194
195 static skiagm::GM* MyFactory(void*) { return new ImageFiltersGraphGM; } 195 static skiagm::GM* MyFactory(void*) { return new ImageFiltersGraphGM; }
196 static skiagm::GMRegistry reg(MyFactory); 196 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