summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Patch.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-10-27 18:57:51 -0700
committerRomain Guy <romainguy@google.com>2010-11-02 16:17:23 -0700
commit5b3b35296e8b2c8d3f07d32bb645d5414db41a1d (patch)
treebad2ebdbfeb8a3a0be1591d5a357a8280df7d1d2 /libs/hwui/Patch.h
parent2444ddb3d9b59ec45ba50858fcbff639e59b93b1 (diff)
downloadframeworks_base-5b3b35296e8b2c8d3f07d32bb645d5414db41a1d.zip
frameworks_base-5b3b35296e8b2c8d3f07d32bb645d5414db41a1d.tar.gz
frameworks_base-5b3b35296e8b2c8d3f07d32bb645d5414db41a1d.tar.bz2
Optimize FBO drawing with regions.
This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file. Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
Diffstat (limited to 'libs/hwui/Patch.h')
-rw-r--r--libs/hwui/Patch.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/hwui/Patch.h b/libs/hwui/Patch.h
index ce898937..1e78b2f 100644
--- a/libs/hwui/Patch.h
+++ b/libs/hwui/Patch.h
@@ -14,13 +14,16 @@
* limitations under the License.
*/
-#ifndef ANDROID_UI_PATCH_H
-#define ANDROID_UI_PATCH_H
+#ifndef ANDROID_HWUI_PATCH_H
+#define ANDROID_HWUI_PATCH_H
#include <sys/types.h>
#include <GLES2/gl2.h>
+#include <utils/Vector.h>
+
+#include "Rect.h"
#include "Vertex.h"
#include "utils/Compare.h"
@@ -96,15 +99,17 @@ struct Patch {
GLuint meshBuffer;
uint32_t verticesCount;
+ Vector<Rect> quads;
+ bool hasEmptyQuads;
private:
TextureVertex* mVertices;
- static inline void generateRow(TextureVertex*& vertex, float y1, float y2,
+ 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,
uint32_t& quadCount, const uint32_t colorKey);
- static inline void generateQuad(TextureVertex*& vertex,
+ 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 colorKey);
@@ -113,4 +118,4 @@ private:
}; // namespace uirenderer
}; // namespace android
-#endif // ANDROID_UI_PATCH_H
+#endif // ANDROID_HWUI_PATCH_H