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
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h
index f10efad..a76cb86 100644
--- a/libs/hwui/FontRenderer.h
+++ b/libs/hwui/FontRenderer.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_UI_FONT_RENDERER_H
-#define ANDROID_UI_FONT_RENDERER_H
+#ifndef ANDROID_HWUI_FONT_RENDERER_H
+#define ANDROID_HWUI_FONT_RENDERER_H
#include <utils/String8.h>
#include <utils/String16.h>
@@ -132,8 +132,8 @@
}
void setFont(SkPaint* paint, uint32_t fontId, float fontSize);
- void renderText(SkPaint* paint, const Rect* clip, const char *text, uint32_t startIndex,
- uint32_t len, int numGlyphs, int x, int y);
+ bool renderText(SkPaint* paint, const Rect* clip, const char *text, uint32_t startIndex,
+ uint32_t len, int numGlyphs, int x, int y, Rect* bounds);
struct DropShadow {
DropShadow() { };
@@ -257,6 +257,8 @@
uint32_t mIndexBufferID;
const Rect* mClip;
+ Rect* mBounds;
+ bool mDrawn;
bool mInitialized;
@@ -273,4 +275,4 @@
}; // namespace uirenderer
}; // namespace android
-#endif // ANDROID_UI_FONT_RENDERER_H
+#endif // ANDROID_HWUI_FONT_RENDERER_H