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

Side by Side Diff: src/core/SkPicturePlayback.h

Issue 1893423002: Fix ImageFilter fuzzer issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove setOffset 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
« no previous file with comments | « src/core/SkPictureData.h ('k') | src/core/SkPicturePlayback.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 2014 Google Inc. 2 * Copyright 2014 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 SkPicturePlayback_DEFINED 8 #ifndef SkPicturePlayback_DEFINED
9 #define SkPicturePlayback_DEFINED 9 #define SkPicturePlayback_DEFINED
10 10
(...skipping 20 matching lines...) Expand all
31 // back. 0 indicates no call is active. 31 // back. 0 indicates no call is active.
32 size_t curOpID() const { return fCurOffset; } 32 size_t curOpID() const { return fCurOffset; }
33 void resetOpID() { fCurOffset = 0; } 33 void resetOpID() { fCurOffset = 0; }
34 34
35 protected: 35 protected:
36 const SkPictureData* fPictureData; 36 const SkPictureData* fPictureData;
37 37
38 // The offset of the current operation when within the draw method 38 // The offset of the current operation when within the draw method
39 size_t fCurOffset; 39 size_t fCurOffset;
40 40
41 void handleOp(SkReader32* reader, 41 void handleOp(SkReadBuffer* reader,
42 DrawType op, 42 DrawType op,
43 uint32_t size, 43 uint32_t size,
44 SkCanvas* canvas, 44 SkCanvas* canvas,
45 const SkMatrix& initialMatrix); 45 const SkMatrix& initialMatrix);
46 46
47 static DrawType ReadOpAndSize(SkReader32* reader, uint32_t* size); 47 static DrawType ReadOpAndSize(SkReadBuffer* reader, uint32_t* size);
48 48
49 class AutoResetOpID { 49 class AutoResetOpID {
50 public: 50 public:
51 AutoResetOpID(SkPicturePlayback* playback) : fPlayback(playback) { } 51 AutoResetOpID(SkPicturePlayback* playback) : fPlayback(playback) { }
52 ~AutoResetOpID() { 52 ~AutoResetOpID() {
53 if (fPlayback) { 53 if (fPlayback) {
54 fPlayback->resetOpID(); 54 fPlayback->resetOpID();
55 } 55 }
56 } 56 }
57 57
58 private: 58 private:
59 SkPicturePlayback* fPlayback; 59 SkPicturePlayback* fPlayback;
60 }; 60 };
61 61
62 private: 62 private:
63 typedef SkNoncopyable INHERITED; 63 typedef SkNoncopyable INHERITED;
64 }; 64 };
65 65
66 #endif 66 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureData.h ('k') | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698