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

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

Issue 2257023003: Plumb drawArc to SkDevice (Closed) Base URL: https://chromium.googlesource.com/skia.git@distance
Patch Set: working Created 4 years, 4 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
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 SkPictureRecord_DEFINED 8 #ifndef SkPictureRecord_DEFINED
9 #define SkPictureRecord_DEFINED 9 #define SkPictureRecord_DEFINED
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 fWriter.writeInt(PACK_8_24(drawType, MASK_24)); 108 fWriter.writeInt(PACK_8_24(drawType, MASK_24));
109 *size += 1; 109 *size += 1;
110 fWriter.writeInt(SkToU32(*size)); 110 fWriter.writeInt(SkToU32(*size));
111 } else { 111 } else {
112 fWriter.writeInt(PACK_8_24(drawType, SkToU32(*size))); 112 fWriter.writeInt(PACK_8_24(drawType, SkToU32(*size)));
113 } 113 }
114 114
115 return offset; 115 return offset;
116 } 116 }
117 117
118 void addBool(bool value) {
119 fWriter.writeBool(value);
120 }
118 void addInt(int value) { 121 void addInt(int value) {
119 fWriter.writeInt(value); 122 fWriter.writeInt(value);
120 } 123 }
121 void addScalar(SkScalar scalar) { 124 void addScalar(SkScalar scalar) {
122 fWriter.writeScalar(scalar); 125 fWriter.writeScalar(scalar);
123 } 126 }
124 127
125 void addImage(const SkImage*); 128 void addImage(const SkImage*);
126 void addMatrix(const SkMatrix& matrix); 129 void addMatrix(const SkMatrix& matrix);
127 void addPaint(const SkPaint& paint) { this->addPaintPtr(&paint); } 130 void addPaint(const SkPaint& paint) { this->addPaintPtr(&paint); }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], 183 void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
181 const SkPoint texCoords[4], SkXfermode* xmode, 184 const SkPoint texCoords[4], SkXfermode* xmode,
182 const SkPaint& paint) override; 185 const SkPaint& paint) override;
183 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk Color[], int, 186 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk Color[], int,
184 SkXfermode::Mode, const SkRect*, const SkPaint*) override; 187 SkXfermode::Mode, const SkRect*, const SkPaint*) override;
185 188
186 void onDrawPaint(const SkPaint&) override; 189 void onDrawPaint(const SkPaint&) override;
187 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain t&) override; 190 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain t&) override;
188 void onDrawRect(const SkRect&, const SkPaint&) override; 191 void onDrawRect(const SkRect&, const SkPaint&) override;
189 void onDrawOval(const SkRect&, const SkPaint&) override; 192 void onDrawOval(const SkRect&, const SkPaint&) override;
193 void onDrawArc(const SkRect&, SkScalar, SkScalar, bool, const SkPaint&) over ride;
190 void onDrawRRect(const SkRRect&, const SkPaint&) override; 194 void onDrawRRect(const SkRRect&, const SkPaint&) override;
191 void onDrawPath(const SkPath&, const SkPaint&) override; 195 void onDrawPath(const SkPath&, const SkPaint&) override;
192 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint* ) override; 196 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint* ) override;
193 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, 197 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst,
194 const SkPaint*, SrcRectConstraint) override; 198 const SkPaint*, SrcRectConstraint) override;
195 void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& ds t, 199 void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& ds t,
196 const SkPaint*) override; 200 const SkPaint*) override;
197 void onDrawImageLattice(const SkImage*, const SkCanvas::Lattice& lattice, co nst SkRect& dst, 201 void onDrawImageLattice(const SkImage*, const SkCanvas::Lattice& lattice, co nst SkRect& dst,
198 const SkPaint*) override; 202 const SkPaint*) override;
199 203
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 280
277 uint32_t fRecordFlags; 281 uint32_t fRecordFlags;
278 int fInitialSaveCount; 282 int fInitialSaveCount;
279 283
280 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c onstructor 284 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c onstructor
281 285
282 typedef SkCanvas INHERITED; 286 typedef SkCanvas INHERITED;
283 }; 287 };
284 288
285 #endif 289 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698