diff options
| author | 2014-03-20 01:14:44 +0000 | |
|---|---|---|
| committer | 2014-03-20 01:14:44 +0000 | |
| commit | 29f00c9f35d8565bb3e6b8a2526cbb237db6446a (patch) | |
| tree | 6afe675a19d1a07a6013db614a849bde14466789 | |
| parent | abde0aaa7958976b8f3a66e348d6a5152b0d838e (diff) | |
| parent | 7c9bd98a4bb0aa6954d5f612c197d03f309980f0 (diff) | |
am 7c9bd98a: am 89513ee5: Merge "Fix projection offset caching - DO NOT MERGE" into klp-dev
* commit '7c9bd98a4bb0aa6954d5f612c197d03f309980f0':
Fix projection offset caching - DO NOT MERGE
| -rw-r--r-- | libs/hwui/Program.cpp | 3 | ||||
| -rw-r--r-- | libs/hwui/Program.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp index 7814a01ad929..58f5325476eb 100644 --- a/libs/hwui/Program.cpp +++ b/libs/hwui/Program.cpp @@ -163,7 +163,7 @@ GLuint Program::buildShader(const char* source, GLenum type) { void Program::set(const mat4& projectionMatrix, const mat4& modelViewMatrix, const mat4& transformMatrix, bool offset) { - if (projectionMatrix != mProjection) { + if (projectionMatrix != mProjection || offset != mOffset) { if (CC_LIKELY(!offset)) { glUniformMatrix4fv(projection, 1, GL_FALSE, &projectionMatrix.data[0]); } else { @@ -177,6 +177,7 @@ void Program::set(const mat4& projectionMatrix, const mat4& modelViewMatrix, glUniformMatrix4fv(projection, 1, GL_FALSE, &p.data[0]); } mProjection = projectionMatrix; + mOffset = offset; } mat4 t(transformMatrix); diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h index 4f94afce9164..f6ac8ec76da8 100644 --- a/libs/hwui/Program.h +++ b/libs/hwui/Program.h @@ -431,6 +431,7 @@ private: bool mHasSampler; mat4 mProjection; + bool mOffset; }; // class Program }; // namespace uirenderer |