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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecords.h
diff --git a/src/core/SkRecords.h b/src/core/SkRecords.h
index 6aefd195c98fd022a51a48e34ce8f9f0092d6e95..1efdf28b14048667d2336e22519d0c502ab91ba6 100644
--- a/src/core/SkRecords.h
+++ b/src/core/SkRecords.h
@@ -232,7 +232,7 @@ RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner);
RECORD2(DrawOval, SkPaint, paint, SkRect, oval);
RECORD1(DrawPaint, SkPaint, paint);
RECORD2(DrawPath, SkPaint, paint, SkPath, path);
-RECORD2(DrawPatch, SkPaint, paint, SkPatch, patch);
+//RECORD2(DrawPatch, SkPaint, paint, SkPatch, patch);
RECORD3(DrawPicture, Optional<SkPaint>, paint, SkPictureBox, picture, Optional<SkMatrix>, matrix);
RECORD4(DrawPoints, SkPaint, paint, SkCanvas::PointMode, mode, size_t, count, SkPoint*, pts);
RECORD4(DrawPosText, SkPaint, paint,
@@ -291,6 +291,24 @@ struct DrawVertices {
PODArray<uint16_t> indices;
int indexCount;
};
+
+struct DrawPatch {
+ static const Type kType = DrawPatch_Type;
+
+ DrawPatch(const SkPaint& paint, SkPoint cubics[12], SkColor colors[4],
+ SkPoint texCoords[4], SkXfermode* xmode)
+ : paint(paint)
+ , cubics(cubics)
+ , colors(colors)
+ , texCoords(texCoords)
+ , xmode(SkSafeRef(xmode)) { }
+
+ SkPaint paint;
+ PODArray<SkPoint> cubics;
+ PODArray<SkColor> colors;
+ PODArray<SkPoint> texCoords;
+ SkAutoTUnref<SkXfermode> xmode;
+};
#undef RECORD0
#undef RECORD1
« 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