Use VBOs to render most geometries.
Change-Id: I4360dc4fe5693ab425450c107282b2c22db4dca7
diff --git a/libs/hwui/Patch.h b/libs/hwui/Patch.h
index 54c9d6c..869b3bf 100644
--- a/libs/hwui/Patch.h
+++ b/libs/hwui/Patch.h
@@ -19,6 +19,8 @@
#include <sys/types.h>
+#include <GLES2/gl2.h>
+
#include "Vertex.h"
#include "utils/Compare.h"
@@ -59,14 +61,14 @@
uint32_t colorKey;
bool operator<(const PatchDescription& rhs) const {
- compare(bitmapWidth) {
- compare(bitmapHeight) {
- compare(pixelWidth) {
- compare(pixelHeight) {
- compareI(xCount) {
- compareI(yCount) {
- compareI(emptyCount) {
- compareI(colorKey) return false;
+ FLOAT_COMPARE(bitmapWidth) {
+ FLOAT_COMPARE(bitmapHeight) {
+ FLOAT_COMPARE(pixelWidth) {
+ FLOAT_COMPARE(pixelHeight) {
+ INT_COMPARE(xCount) {
+ INT_COMPARE(yCount) {
+ INT_COMPARE(emptyCount) {
+ INT_COMPARE(colorKey) return false;
}
}
}
@@ -92,10 +94,12 @@
const uint32_t width, const uint32_t height,
const uint32_t colorKey = 0);
- TextureVertex* vertices;
+ GLuint meshBuffer;
uint32_t verticesCount;
private:
+ TextureVertex* mVertices;
+
static inline void generateRow(TextureVertex*& vertex, float y1, float y2,
float v1, float v2, const int32_t xDivs[], uint32_t xCount,
float stretchX, float width, float bitmapWidth,