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

Unified Diff: src/gpu/GrGpu.cpp

Issue 400713003: Add a GrPathRange class (Closed) Base URL: https://skia.googlesource.com/skia.git@clupload-ispath
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/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index fd249deb7b065251c3a6c495df1aa38cfe962892..6a53e7e0d68cd20925908b567bfd6bc458776397 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -218,6 +218,12 @@ GrPath* GrGpu::createPath(const SkPath& path, const SkStrokeRec& stroke) {
return this->onCreatePath(path, stroke);
}
+GrPathRange* GrGpu::createPathRange(size_t size, const SkStrokeRec& stroke) {
+ SkASSERT(this->caps()->pathRenderingSupport());
+ this->handleDirtyContext();
+ return this->onCreatePathRange(size, stroke);
+}
+
void GrGpu::clear(const SkIRect* rect,
GrColor color,
bool canIgnoreRect,
@@ -419,10 +425,10 @@ void GrGpu::onDrawPath(const GrPath* path, SkPath::FillType fill,
this->onGpuDrawPath(path, fill);
}
-void GrGpu::onDrawPaths(int pathCount, const GrPath** paths,
- const SkMatrix* transforms, SkPath::FillType fill,
- SkStrokeRec::Style style,
- const GrDeviceCoordTexture* dstCopy) {
+void GrGpu::onDrawPaths(const GrPathRange* pathRange,
+ const uint32_t indices[], int count,
+ const float transforms[], GrTransformFormat transformsFormat,
+ SkPath::FillType fill, const GrDeviceCoordTexture* dstCopy) {
this->handleDirtyContext();
drawState()->setDefaultVertexAttribs();
@@ -432,7 +438,7 @@ void GrGpu::onDrawPaths(int pathCount, const GrPath** paths,
return;
}
- this->onGpuDrawPaths(pathCount, paths, transforms, fill, style);
+ this->onGpuDrawPaths(pathRange, indices, count, transforms, transformsFormat, fill);
}
void GrGpu::finalizeReservedVertices() {

Powered by Google App Engine
This is Rietveld 408576698