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

Unified Diff: src/gpu/GrTessellator.h

Issue 1776003002: GrTessellator: abstract vertex allocation into caller (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: VertexBuffer -> VertexAllocator Created 4 years, 9 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 | « no previous file | src/gpu/GrTessellator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTessellator.h
diff --git a/src/gpu/GrTessellator.h b/src/gpu/GrTessellator.h
index 4304920fbc024856a9f5d7bc7fc09cf72a9d1a5d..9e7d5f0b135254f03d0136cc681ae3cb3e6d895f 100644
--- a/src/gpu/GrTessellator.h
+++ b/src/gpu/GrTessellator.h
@@ -8,8 +8,10 @@
#ifndef GrTessellator_DEFINED
#define GrTessellator_DEFINED
-#include "SkPath.h"
-#include "GrResourceProvider.h"
+#include "SkPoint.h"
+
+class SkPath;
+struct SkRect;
/**
* Provides utility functions for converting paths to a collection of triangles.
@@ -19,6 +21,13 @@
namespace GrTessellator {
+class VertexAllocator {
+public:
+ virtual ~VertexAllocator() {}
+ virtual SkPoint* lock(int vertexCount) = 0;
+ virtual void unlock(int actualCount) = 0;
+};
+
struct WindingVertex {
SkPoint fPos;
int fWinding;
@@ -32,9 +41,7 @@ int PathToVertices(const SkPath& path, SkScalar tolerance, const SkRect& clipBou
WindingVertex** verts);
int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds,
- GrResourceProvider* resourceProvider,
- SkAutoTUnref<GrVertexBuffer>& vertexBuffer, bool canMapVB, bool* isLinear);
-
+ VertexAllocator*, bool *isLinear);
}
#endif
« no previous file with comments | « no previous file | src/gpu/GrTessellator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698