Add text rendering.
Change-Id: Ibe5a9fa844d531b31b55e43de403a98d49f659b9
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 9dc2a43..b82366b 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -39,6 +39,7 @@
#include "GradientCache.h"
#include "PatchCache.h"
#include "Vertex.h"
+#include "FontRenderer.h"
namespace android {
namespace uirenderer {
@@ -108,6 +109,8 @@
float* positions, int count, SkShader::TileMode tileMode,
SkMatrix* matrix, bool hasAlpha);
+ void drawText(const char* text, int count, float x, float y, SkPaint* paint);
+
private:
/**
* Type of Skia shader in use.
@@ -329,6 +332,7 @@
sp<Program> mCurrentProgram;
sp<DrawColorProgram> mDrawColorProgram;
sp<DrawTextureProgram> mDrawTextureProgram;
+ sp<DrawTextProgram> mDrawTextProgram;
sp<DrawLinearGradientProgram> mDrawLinearGradientProgram;
// Used to draw textured quads
@@ -357,6 +361,9 @@
float* mShaderPositions;
int mShaderCount;
+ // Font renderer
+ FontRenderer mFontRenderer;
+
// Various caches
TextureCache mTextureCache;
LayerCache mLayerCache;