Add AndroidPathRenderer to experimental gyp and get it compiling with Skia code.
https://codereview.appspot.com/6938074/
git-svn-id: http://skia.googlecode.com/svn/trunk@6874 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/AndroidPathRenderer/AndroidPathRenderer.h b/experimental/AndroidPathRenderer/AndroidPathRenderer.h
index a17ce9b..64aebfa 100644
--- a/experimental/AndroidPathRenderer/AndroidPathRenderer.h
+++ b/experimental/AndroidPathRenderer/AndroidPathRenderer.h
@@ -8,16 +8,15 @@
#ifndef ANDROID_HWUI_PATH_RENDERER_H
#define ANDROID_HWUI_PATH_RENDERER_H
-#include <utils/Vector.h>
+#include <SkTArray.h>
#include "Vertex.h"
+class SkMatrix;
+
namespace android {
namespace uirenderer {
-class Matrix4;
-typedef Matrix4 mat4;
-
class VertexBuffer {
public:
VertexBuffer():
@@ -56,37 +55,37 @@
class PathRenderer {
public:
- static SkRect computePathBounds(const SkPath& path, const SkPaint* paint);
+ static SkRect ComputePathBounds(const SkPath& path, const SkPaint* paint);
- static void convexPathVertices(const SkPath& path, const SkPaint* paint,
- const mat4 *transform, VertexBuffer& vertexBuffer);
+ static void ConvexPathVertices(const SkPath& path, const SkPaint* paint,
+ const SkMatrix* transform, VertexBuffer* vertexBuffer);
private:
- static bool convexPathPerimeterVertices(const SkPath &path, bool forceClose,
- float sqrInvScaleX, float sqrInvScaleY, Vector<Vertex> &outputVertices);
+ static bool ConvexPathPerimeterVertices(const SkPath &path, bool forceClose,
+ float sqrInvScaleX, float sqrInvScaleY, SkTArray<Vertex, true>* outputVertices);
/*
endpoints a & b,
control c
*/
- static void recursiveQuadraticBezierVertices(
+ static void RecursiveQuadraticBezierVertices(
float ax, float ay,
float bx, float by,
float cx, float cy,
float sqrInvScaleX, float sqrInvScaleY,
- Vector<Vertex> &outputVertices);
+ SkTArray<Vertex, true>* outputVertices);
/*
endpoints p1, p2
control c1, c2
*/
- static void recursiveCubicBezierVertices(
+ static void RecursiveCubicBezierVertices(
float p1x, float p1y,
float c1x, float c1y,
float p2x, float p2y,
float c2x, float c2y,
float sqrInvScaleX, float sqrInvScaleY,
- Vector<Vertex> &outputVertices);
+ SkTArray<Vertex, true>* outputVertices);
};
}; // namespace uirenderer