summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Patch.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Patch.h')
-rw-r--r--libs/hwui/Patch.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/libs/hwui/Patch.h b/libs/hwui/Patch.h
index 9afb41d..b63bd24 100644
--- a/libs/hwui/Patch.h
+++ b/libs/hwui/Patch.h
@@ -39,7 +39,9 @@ struct TextureVertex;
class Patch {
public:
- Patch() {}
+ Patch(const float bitmapWidth, const float bitmapHeight,
+ float width, float height,
+ const UvMapper& mapper, const Res_png_9patch* patch);
/**
* Returns the size of this patch's mesh in bytes.
@@ -52,15 +54,9 @@ public:
bool hasEmptyQuads = false;
Vector<Rect> quads;
- Rect bounds;
- GLintptr offset = 0;
+ GLintptr positionOffset = 0;
GLintptr textureOffset = 0;
- TextureVertex* createMesh(const float bitmapWidth, const float bitmapHeight,
- float width, float height, const Res_png_9patch* patch);
- TextureVertex* createMesh(const float bitmapWidth, const float bitmapHeight,
- float width, float height, const UvMapper& mapper, const Res_png_9patch* patch);
-
private:
void generateRow(const int32_t* xDivs, uint32_t xCount, TextureVertex*& vertex,
float y1, float y2, float v1, float v2, float stretchX, float rescaleX,
@@ -68,7 +64,7 @@ private:
void generateQuad(TextureVertex*& vertex, float x1, float y1, float x2, float y2,
float u1, float v1, float u2, float v2, uint32_t& quadCount);
- const uint32_t* mColors = nullptr;
+ const uint32_t* mColors;
UvMapper mUvMapper;
}; // struct Patch