summaryrefslogtreecommitdiff
path: root/libs/rs/rsProgramVertex.cpp
diff options
context:
space:
mode:
author Alex Sakhartchouk <alexst@google.com> 2011-11-17 09:13:24 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2011-11-17 09:13:24 -0800
commit5044556861af496d6451aef3f69a4df0d1b591c9 (patch)
treee083a6288023969c64e6d22c8cec5887bdd5fff0 /libs/rs/rsProgramVertex.cpp
parent1bce803f663d50a3a60fab63f565f91bce5c35e5 (diff)
parent2d8ef49914595f3f1df42fed0a9ae68777ff9411 (diff)
Merge "Fixing FBO font rendering bug that resulted from using old surface size."
Diffstat (limited to 'libs/rs/rsProgramVertex.cpp')
-rw-r--r--libs/rs/rsProgramVertex.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index 4a1362254b0b..871caacd6f66 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/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));