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

Side by Side Diff: src/core/SkRecords.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/SkRecorder.cpp ('k') | src/core/SkValidatingReadBuffer.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 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 SkRecords_DEFINED 8 #ifndef SkRecords_DEFINED
9 #define SkRecords_DEFINED 9 #define SkRecords_DEFINED
10 10
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 SkRect, dst); 225 SkRect, dst);
226 RECORD5(DrawBitmapRectToRect, Optional<SkPaint>, paint, 226 RECORD5(DrawBitmapRectToRect, Optional<SkPaint>, paint,
227 ImmutableBitmap, bitmap, 227 ImmutableBitmap, bitmap,
228 Optional<SkRect>, src, 228 Optional<SkRect>, src,
229 SkRect, dst, 229 SkRect, dst,
230 SkCanvas::DrawBitmapRectFlags, flags); 230 SkCanvas::DrawBitmapRectFlags, flags);
231 RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner); 231 RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner);
232 RECORD2(DrawOval, SkPaint, paint, SkRect, oval); 232 RECORD2(DrawOval, SkPaint, paint, SkRect, oval);
233 RECORD1(DrawPaint, SkPaint, paint); 233 RECORD1(DrawPaint, SkPaint, paint);
234 RECORD2(DrawPath, SkPaint, paint, SkPath, path); 234 RECORD2(DrawPath, SkPaint, paint, SkPath, path);
235 RECORD2(DrawPatch, SkPaint, paint, SkPatch, patch); 235 //RECORD2(DrawPatch, SkPaint, paint, SkPatch, patch);
236 RECORD3(DrawPicture, Optional<SkPaint>, paint, SkPictureBox, picture, Optional<S kMatrix>, matrix); 236 RECORD3(DrawPicture, Optional<SkPaint>, paint, SkPictureBox, picture, Optional<S kMatrix>, matrix);
237 RECORD4(DrawPoints, SkPaint, paint, SkCanvas::PointMode, mode, size_t, count, Sk Point*, pts); 237 RECORD4(DrawPoints, SkPaint, paint, SkCanvas::PointMode, mode, size_t, count, Sk Point*, pts);
238 RECORD4(DrawPosText, SkPaint, paint, 238 RECORD4(DrawPosText, SkPaint, paint,
239 PODArray<char>, text, 239 PODArray<char>, text,
240 size_t, byteLength, 240 size_t, byteLength,
241 PODArray<SkPoint>, pos); 241 PODArray<SkPoint>, pos);
242 RECORD5(DrawPosTextH, SkPaint, paint, 242 RECORD5(DrawPosTextH, SkPaint, paint,
243 PODArray<char>, text, 243 PODArray<char>, text,
244 size_t, byteLength, 244 size_t, byteLength,
245 PODArray<SkScalar>, xpos, 245 PODArray<SkScalar>, xpos,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 SkPaint paint; 284 SkPaint paint;
285 SkCanvas::VertexMode vmode; 285 SkCanvas::VertexMode vmode;
286 int vertexCount; 286 int vertexCount;
287 PODArray<SkPoint> vertices; 287 PODArray<SkPoint> vertices;
288 PODArray<SkPoint> texs; 288 PODArray<SkPoint> texs;
289 PODArray<SkColor> colors; 289 PODArray<SkColor> colors;
290 SkAutoTUnref<SkXfermode> xmode; 290 SkAutoTUnref<SkXfermode> xmode;
291 PODArray<uint16_t> indices; 291 PODArray<uint16_t> indices;
292 int indexCount; 292 int indexCount;
293 }; 293 };
294
295 struct DrawPatch {
296 static const Type kType = DrawPatch_Type;
297
298 DrawPatch(const SkPaint& paint, SkPoint cubics[12], SkColor colors[4],
299 SkPoint texCoords[4], SkXfermode* xmode)
300 : paint(paint)
301 , cubics(cubics)
302 , colors(colors)
303 , texCoords(texCoords)
304 , xmode(SkSafeRef(xmode)) { }
305
306 SkPaint paint;
307 PODArray<SkPoint> cubics;
308 PODArray<SkColor> colors;
309 PODArray<SkPoint> texCoords;
310 SkAutoTUnref<SkXfermode> xmode;
311 };
294 312
295 #undef RECORD0 313 #undef RECORD0
296 #undef RECORD1 314 #undef RECORD1
297 #undef RECORD2 315 #undef RECORD2
298 #undef RECORD3 316 #undef RECORD3
299 #undef RECORD4 317 #undef RECORD4
300 #undef RECORD5 318 #undef RECORD5
301 319
302 } // namespace SkRecords 320 } // namespace SkRecords
303 321
304 #endif//SkRecords_DEFINED 322 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698