OLD | NEW |
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 SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 return offset; | 144 return offset; |
145 } | 145 } |
146 | 146 |
147 void addInt(int value) { | 147 void addInt(int value) { |
148 fWriter.writeInt(value); | 148 fWriter.writeInt(value); |
149 } | 149 } |
150 void addScalar(SkScalar scalar) { | 150 void addScalar(SkScalar scalar) { |
151 fWriter.writeScalar(scalar); | 151 fWriter.writeScalar(scalar); |
152 } | 152 } |
153 | 153 |
154 // The command at 'offset' in the skp uses the specified bitmap | 154 void addBitmap(const SkBitmap& bitmap); |
155 int addBitmap(const SkBitmap& bitmap); | |
156 void addMatrix(const SkMatrix& matrix); | 155 void addMatrix(const SkMatrix& matrix); |
157 void addPaint(const SkPaint& paint) { this->addPaintPtr(&paint); } | 156 void addPaint(const SkPaint& paint) { this->addPaintPtr(&paint); } |
158 void addPaintPtr(const SkPaint* paint); | 157 void addPaintPtr(const SkPaint* paint); |
159 void addPatch(const SkPoint cubics[12]); | 158 void addPatch(const SkPoint cubics[12]); |
160 void addPath(const SkPath& path); | 159 void addPath(const SkPath& path); |
161 void addPicture(const SkPicture* picture); | 160 void addPicture(const SkPicture* picture); |
162 void addPoint(const SkPoint& point); | 161 void addPoint(const SkPoint& point); |
163 void addPoints(const SkPoint pts[], int count); | 162 void addPoints(const SkPoint pts[], int count); |
164 void addRect(const SkRect& rect); | 163 void addRect(const SkRect& rect); |
165 void addRectPtr(const SkRect* rect); | 164 void addRectPtr(const SkRect* rect); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 245 |
247 uint32_t fRecordFlags; | 246 uint32_t fRecordFlags; |
248 int fInitialSaveCount; | 247 int fInitialSaveCount; |
249 | 248 |
250 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor | 249 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor |
251 | 250 |
252 typedef SkCanvas INHERITED; | 251 typedef SkCanvas INHERITED; |
253 }; | 252 }; |
254 | 253 |
255 #endif | 254 #endif |
OLD | NEW |