diff options
author | Alex Sakhartchouk <alexst@google.com> | 2011-11-16 12:22:10 -0800 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2011-11-16 12:22:10 -0800 |
commit | 2d8ef49914595f3f1df42fed0a9ae68777ff9411 (patch) | |
tree | a7bd41b3a01cb9a824056fc04972ddb72e88ee31 /libs/rs/rsProgramVertex.cpp | |
parent | 7b95eba9f47a3992128d59a9ec593b887e4dac0e (diff) | |
download | frameworks_base-2d8ef49914595f3f1df42fed0a9ae68777ff9411.zip frameworks_base-2d8ef49914595f3f1df42fed0a9ae68777ff9411.tar.gz frameworks_base-2d8ef49914595f3f1df42fed0a9ae68777ff9411.tar.bz2 |
Fixing FBO font rendering bug that resulted from using old surface size.
Change-Id: I31d0967bb36ca6ffb6a4c8194597d3c523cfe954
Diffstat (limited to 'libs/rs/rsProgramVertex.cpp')
-rw-r--r-- | libs/rs/rsProgramVertex.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp index 4a13622..871caac 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)); |