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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 424663006: SkCanvas interface for drawing a patch. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index c35ff41219be49f68297780abb2303c1378be17e..be461ee580b2a9b38b20ee9ab77bd73905432f2c 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1707,6 +1707,13 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode,
indexCount);
}
+void SkGpuDevice::drawPatch(const SkDraw& draw, const SkPatch& patch, const SkPaint& paint) {
+ SkPatch::VertexData data;
+ patch.getVertexData(&data, draw.fMatrix->getScaleX() * 10, draw.fMatrix->getScaleY() * 10);
+ this->drawVertices(draw, SkCanvas::kTriangles_VertexMode, data.fVertexCount, data.fPoints,
+ data.fTexCoords, data.fColors, NULL, data.fIndices, data.fIndexCount, paint);
+}
+
///////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawText(const SkDraw& draw, const void* text,
« src/core/SkCanvas.cpp ('K') | « src/gpu/GrPictureUtils.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698