From 759ea80dca64ad652110a129e0d8bf93fea79f61 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 16 Sep 2010 20:49:46 -0700 Subject: Add support for drawLines(), with anti-aliasing Change-Id: I16c0593c5671490909dec13a85df601e1428a1a6 --- libs/hwui/Patch.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libs/hwui/Patch.cpp') diff --git a/libs/hwui/Patch.cpp b/libs/hwui/Patch.cpp index a66073030105..0a6eca3b01be 100644 --- a/libs/hwui/Patch.cpp +++ b/libs/hwui/Patch.cpp @@ -16,11 +16,8 @@ #define LOG_TAG "OpenGLRenderer" -#include #include -#include - #include "Patch.h" namespace android { @@ -34,7 +31,6 @@ Patch::Patch(const uint32_t xCount, const uint32_t yCount) { // 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 @@ Patch::~Patch() { // 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 @@ void Patch::updateVertices(const SkBitmap* bitmap, float left, float top, float 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) { -- cgit v1.2.3-59-g8ed1b