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

Unified Diff: src/core/SkRecorder.cpp

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.h ('k') | src/core/SkRecords.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecorder.cpp
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 6b3eac9866728fdbf4e7bcc0a96b37809f275001..327a97acdbe3316b227cfe77b5a803ed3c57d1ff 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -6,6 +6,7 @@
*/
#include "SkRecorder.h"
+#include "SkPatchUtils.h"
#include "SkPicture.h"
// SkCanvas will fail in mysterious ways if it doesn't know the real width and height.
@@ -206,8 +207,13 @@ void SkRecorder::drawVertices(VertexMode vmode,
indexCount);
}
-void SkRecorder::drawPatch(const SkPatch& patch, const SkPaint& paint) {
- APPEND(DrawPatch, delay_copy(paint), delay_copy(patch));
+void SkRecorder::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
+ const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint) {
+ APPEND(DrawPatch, delay_copy(paint),
+ cubics ? this->copy(cubics, SkPatchUtils::kNumCtrlPts) : NULL,
+ colors ? this->copy(colors, SkPatchUtils::kNumCorners) : NULL,
+ texCoords ? this->copy(texCoords, SkPatchUtils::kNumCorners) : NULL,
+ xmode);
}
void SkRecorder::willSave() {
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698