summaryrefslogtreecommitdiff
path: root/libs/hwui/LayerRenderer.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-03-05 16:43:31 -0800
committer Romain Guy <romainguy@google.com> 2013-03-05 18:12:35 -0800
commit624234f69b2a4781d24f3e4c6ae6450729e38397 (patch)
treed6ae0bfd751e0e59329cb678c1d9f1cec447ee3e /libs/hwui/LayerRenderer.cpp
parent0b58a3deab66c30a8d35072e55aac6279dd367cc (diff)
Take only the scale params into account to rasterize text
This change extracts the scale parameters of the current transform to pass then to the font renderer. Rotation and perspective are applied to the generated mesh inside the vertex shader. This limits the number of glyphs we have to create in the font cache and thus reduces memory churn. Change-Id: Ic5b3bae2b2b0e0250a8ee723b071a1709725c749
Diffstat (limited to 'libs/hwui/LayerRenderer.cpp')
-rw-r--r--libs/hwui/LayerRenderer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index 14c7c39b39e3..9aa961587ce6 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -92,11 +92,11 @@ void LayerRenderer::finish() {
// who will invoke OpenGLRenderer::resume()
}
-GLint LayerRenderer::getTargetFbo() {
+GLint LayerRenderer::getTargetFbo() const {
return mLayer->getFbo();
}
-bool LayerRenderer::suppressErrorChecks() {
+bool LayerRenderer::suppressErrorChecks() const {
return true;
}
@@ -104,7 +104,7 @@ bool LayerRenderer::suppressErrorChecks() {
// Layer support
///////////////////////////////////////////////////////////////////////////////
-bool LayerRenderer::hasLayer() {
+bool LayerRenderer::hasLayer() const {
return true;
}
@@ -116,7 +116,7 @@ void LayerRenderer::ensureStencilBuffer() {
// Dirty region tracking
///////////////////////////////////////////////////////////////////////////////
-Region* LayerRenderer::getRegion() {
+Region* LayerRenderer::getRegion() const {
if (getSnapshot()->flags & Snapshot::kFlagFboTarget) {
return OpenGLRenderer::getRegion();
}