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

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

Issue 463493002: SkCanvas::drawPatch param SkPoint[12] (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Removed GPU headers from GM Created 6 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
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureRecord.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 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const SkPaint*) SK_OVERRIDE; 51 const SkPaint*) SK_OVERRIDE;
52 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 52 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
53 const SkRect& dst, const SkPaint*) SK_OVERRIDE; 53 const SkRect& dst, const SkPaint*) SK_OVERRIDE;
54 virtual void drawSprite(const SkBitmap&, int left, int top, 54 virtual void drawSprite(const SkBitmap&, int left, int top,
55 const SkPaint*) SK_OVERRIDE; 55 const SkPaint*) SK_OVERRIDE;
56 virtual void drawVertices(VertexMode, int vertexCount, 56 virtual void drawVertices(VertexMode, int vertexCount,
57 const SkPoint vertices[], const SkPoint texs[], 57 const SkPoint vertices[], const SkPoint texs[],
58 const SkColor colors[], SkXfermode*, 58 const SkColor colors[], SkXfermode*,
59 const uint16_t indices[], int indexCount, 59 const uint16_t indices[], int indexCount,
60 const SkPaint&) SK_OVERRIDE; 60 const SkPaint&) SK_OVERRIDE;
61 virtual void drawPatch(const SkPatch& patch, const SkPaint& paint) SK_OVERRI DE;
62 virtual void drawData(const void*, size_t) SK_OVERRIDE; 61 virtual void drawData(const void*, size_t) SK_OVERRIDE;
63 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 62 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
64 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 63 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
65 virtual void endCommentGroup() SK_OVERRIDE; 64 virtual void endCommentGroup() SK_OVERRIDE;
66 virtual bool isDrawingToLayer() const SK_OVERRIDE; 65 virtual bool isDrawingToLayer() const SK_OVERRIDE;
67 66
68 void addFontMetricsTopBottom(const SkPaint& paint, const SkFlatData&, 67 void addFontMetricsTopBottom(const SkPaint& paint, const SkFlatData&,
69 SkScalar minY, SkScalar maxY); 68 SkScalar minY, SkScalar maxY);
70 69
71 const SkTDArray<const SkPicture* >& getPictureRefs() const { 70 const SkTDArray<const SkPicture* >& getPictureRefs() const {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 void addScalar(SkScalar scalar) { 162 void addScalar(SkScalar scalar) {
164 fWriter.writeScalar(scalar); 163 fWriter.writeScalar(scalar);
165 } 164 }
166 165
167 // The command at 'offset' in the skp uses the specified bitmap 166 // The command at 'offset' in the skp uses the specified bitmap
168 int addBitmap(const SkBitmap& bitmap); 167 int addBitmap(const SkBitmap& bitmap);
169 void addMatrix(const SkMatrix& matrix); 168 void addMatrix(const SkMatrix& matrix);
170 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr( &paint); } 169 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr( &paint); }
171 const SkFlatData* addPaintPtr(const SkPaint* paint); 170 const SkFlatData* addPaintPtr(const SkPaint* paint);
172 void addFlatPaint(const SkFlatData* flatPaint); 171 void addFlatPaint(const SkFlatData* flatPaint);
173 void addPatch(const SkPatch& patch); 172 void addPatch(const SkPoint cubics[12]);
174 void addPath(const SkPath& path); 173 void addPath(const SkPath& path);
175 void addPicture(const SkPicture* picture); 174 void addPicture(const SkPicture* picture);
176 void addPoint(const SkPoint& point); 175 void addPoint(const SkPoint& point);
177 void addPoints(const SkPoint pts[], int count); 176 void addPoints(const SkPoint pts[], int count);
178 void addRect(const SkRect& rect); 177 void addRect(const SkRect& rect);
179 void addRectPtr(const SkRect* rect); 178 void addRectPtr(const SkRect* rect);
180 void addIRect(const SkIRect& rect); 179 void addIRect(const SkIRect& rect);
181 void addIRectPtr(const SkIRect* rect); 180 void addIRectPtr(const SkIRect* rect);
182 void addRRect(const SkRRect&); 181 void addRRect(const SkRRect&);
183 void addRegion(const SkRegion& region); 182 void addRegion(const SkRegion& region);
(...skipping 23 matching lines...) Expand all
207 virtual void onPopCull() SK_OVERRIDE; 206 virtual void onPopCull() SK_OVERRIDE;
208 207
209 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y, 208 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y,
210 const SkPaint&) SK_OVERRIDE; 209 const SkPaint&) SK_OVERRIDE;
211 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[], 210 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[],
212 const SkPaint&) SK_OVERRIDE; 211 const SkPaint&) SK_OVERRIDE;
213 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[], 212 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[],
214 SkScalar constY, const SkPaint&) SK_OVERRIDE; 213 SkScalar constY, const SkPaint&) SK_OVERRIDE;
215 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 214 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
216 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE; 215 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
216
217 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
218 const SkPoint texCoords[4], SkXfermode* xmode,
219 const SkPaint& paint) SK_OVERRIDE;
217 220
218 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 221 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
219 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 222 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
220 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 223 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
221 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 224 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
222 225
223 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE; 226 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE;
224 227
225 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been 228 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been
226 // tweaked by paint.computeFastBounds(). 229 // tweaked by paint.computeFastBounds().
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 bool fOptsEnabled; 287 bool fOptsEnabled;
285 int fInitialSaveCount; 288 int fInitialSaveCount;
286 289
287 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c onstructor 290 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c onstructor
288 friend class SkPictureTester; // for unit testing 291 friend class SkPictureTester; // for unit testing
289 292
290 typedef SkCanvas INHERITED; 293 typedef SkCanvas INHERITED;
291 }; 294 };
292 295
293 #endif 296 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698