summaryrefslogtreecommitdiffstats
path: root/rsProgramVertex.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-11-16 12:22:10 -0800
committerAlex Sakhartchouk <alexst@google.com>2011-11-16 12:22:10 -0800
commita74a8f635ce4fae0a9d4b9c79e9fa412787bf6a2 (patch)
tree91ea5a7a060d9406c5d982e3af8a137b4c0f84de /rsProgramVertex.cpp
parent795e405d18a2523ab81bcad47e3256ad66aefb24 (diff)
downloadandroid_frameworks_rs-a74a8f635ce4fae0a9d4b9c79e9fa412787bf6a2.tar.gz
android_frameworks_rs-a74a8f635ce4fae0a9d4b9c79e9fa412787bf6a2.tar.bz2
android_frameworks_rs-a74a8f635ce4fae0a9d4b9c79e9fa412787bf6a2.zip
Fixing FBO font rendering bug that resulted from using old surface size.
Change-Id: I31d0967bb36ca6ffb6a4c8194597d3c523cfe954
Diffstat (limited to 'rsProgramVertex.cpp')
-rw-r--r--rsProgramVertex.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/rsProgramVertex.cpp b/rsProgramVertex.cpp
index 4a136225..871caacd 100644
--- a/rsProgramVertex.cpp
+++ b/rsProgramVertex.cpp
@@ -206,8 +206,11 @@ void ProgramVertexState::init(Context *rsc) {
void ProgramVertexState::updateSize(Context *rsc) {
float *f = static_cast<float *>(mDefaultAlloc->getPtr());
+ float surfaceWidth = (float)rsc->getCurrentSurfaceWidth();
+ float surfaceHeight = (float)rsc->getCurrentSurfaceHeight();
+
Matrix4x4 m;
- m.loadOrtho(0,rsc->getWidth(), rsc->getHeight(),0, -1,1);
+ m.loadOrtho(0, surfaceWidth, surfaceHeight, 0, -1, 1);
memcpy(&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET], m.m, sizeof(m));
memcpy(&f[RS_PROGRAM_VERTEX_MVP_OFFSET], m.m, sizeof(m));