Add support for drawLines(), with anti-aliasing
Change-Id: I16c0593c5671490909dec13a85df601e1428a1a6
diff --git a/libs/hwui/Patch.cpp b/libs/hwui/Patch.cpp
index a660730..0a6eca3 100644
--- a/libs/hwui/Patch.cpp
+++ b/libs/hwui/Patch.cpp
@@ -16,11 +16,8 @@
#define LOG_TAG "OpenGLRenderer"
-#include <cstring>
#include <cmath>
-#include <utils/Log.h>
-
#include "Patch.h"
namespace android {
@@ -34,7 +31,6 @@
// 2 triangles per patch, 3 vertices per triangle
verticesCount = (xCount + 1) * (yCount + 1) * 2 * 3;
vertices = new TextureVertex[verticesCount];
- memset(vertices, 0, sizeof(TextureVertex) * verticesCount);
}
Patch::~Patch() {
@@ -45,9 +41,9 @@
// Vertices management
///////////////////////////////////////////////////////////////////////////////
-void Patch::updateVertices(const SkBitmap* bitmap, float left, float top, float right,
- float bottom, const int32_t* xDivs, const int32_t* yDivs, const uint32_t width,
- const uint32_t height) {
+void Patch::updateVertices(const float bitmapWidth, const float bitmapHeight,
+ float left, float top, float right, float bottom,
+ const int32_t* xDivs, const int32_t* yDivs, const uint32_t width, const uint32_t height) {
const uint32_t xStretchCount = (width + 1) >> 1;
const uint32_t yStretchCount = (height + 1) >> 1;
@@ -56,9 +52,6 @@
const float meshWidth = right - left;
- const float bitmapWidth = float(bitmap->width());
- const float bitmapHeight = float(bitmap->height());
-
if (xStretchCount > 0) {
uint32_t stretchSize = 0;
for (uint32_t i = 1; i < width; i += 2) {