Add support for drawPoint() and drawPoints().
Change-Id: I01bef50c08ec3160f8d40dc060b2cf6c2e4d7639
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index f2f983f..bf1182c 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -53,6 +53,7 @@
"DrawArc",
"DrawPath",
"DrawLines",
+ "DrawPoints",
"DrawText",
"ResetShader",
"SetupShader",
@@ -441,6 +442,13 @@
renderer.drawLines(points, count, getPaint());
}
break;
+ case DrawPoints: {
+ int count = 0;
+ float* points = getFloats(count);
+ DISPLAY_LIST_LOGD("%s%s", (char*) indent, OP_NAMES[op]);
+ renderer.drawPoints(points, count, getPaint());
+ }
+ break;
case DrawText: {
getText(&text);
int count = getInt();
@@ -787,6 +795,12 @@
addPaint(paint);
}
+void DisplayListRenderer::drawPoints(float* points, int count, SkPaint* paint) {
+ addOp(DisplayList::DrawPoints);
+ addFloats(points, count);
+ addPaint(paint);
+}
+
void DisplayListRenderer::drawText(const char* text, int bytesCount, int count,
float x, float y, SkPaint* paint) {
addOp(DisplayList::DrawText);