Add cap tessellation support
bug:7117155
bug:8114304
Currently used for lines (with and without AA) and arcs with useCenter=false
Also removes 0.375, 0.375 offset for AA lines
Change-Id: Ic8ace418739344db1e2814edf65253fe7448b0b0
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 594580e..22dc718 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -53,6 +53,7 @@
///////////////////////////////////////////////////////////////////////////////
class DisplayList;
+class VertexBuffer;
/**
* OpenGL renderer used to draw accelerated 2D graphics. The API is a
@@ -582,12 +583,22 @@
void drawAlphaBitmap(Texture* texture, float left, float top, SkPaint* paint);
/**
+ * Renders a strip of polygons with the specified paint, used for tessellated geometry.
+ *
+ * @param vertexBuffer The VertexBuffer to be drawn
+ * @param paint The paint to render with
+ * @param useOffset Offset the vertexBuffer (used in drawing non-AA lines)
+ */
+ status_t drawVertexBuffer(const VertexBuffer& vertexBuffer, SkPaint* paint,
+ bool useOffset = false);
+
+ /**
* Renders the convex hull defined by the specified path as a strip of polygons.
*
* @param path The hull of the path to draw
* @param paint The paint to render with
*/
- void drawConvexPath(const SkPath& path, SkPaint* paint);
+ status_t drawConvexPath(const SkPath& path, SkPaint* paint);
/**
* Draws a textured rectangle with the specified texture. The specified coordinates
@@ -754,7 +765,6 @@
void setupDrawWithExternalTexture();
void setupDrawNoTexture();
void setupDrawAA();
- void setupDrawVertexShape();
void setupDrawPoint(float pointSize);
void setupDrawColor(int color, int alpha);
void setupDrawColor(float r, float g, float b, float a);
@@ -788,9 +798,6 @@
void setupDrawMesh(GLvoid* vertices, GLvoid* texCoords = NULL, GLuint vbo = 0);
void setupDrawMeshIndices(GLvoid* vertices, GLvoid* texCoords);
void setupDrawVertices(GLvoid* vertices);
- void setupDrawAALine(GLvoid* vertices, GLvoid* distanceCoords, GLvoid* lengthCoords,
- float strokeWidth, int& widthSlot, int& lengthSlot);
- void finishDrawAALine(const int widthSlot, const int lengthSlot);
void finishDrawTexture();
void accountForClear(SkXfermode::Mode mode);