diff options
author | Romain Guy <romainguy@google.com> | 2013-03-18 19:30:48 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-03-18 19:30:48 -0700 |
commit | d4289922ce772ed8e170a27d1c9521672b315698 (patch) | |
tree | 211cddaef3df27355b6aa0029a39116c39b61c7e /libs/hwui/SkiaShader.cpp | |
parent | c46d07a29e94807e768f8b162ce9f77a88ba6f46 (diff) | |
download | frameworks_base-d4289922ce772ed8e170a27d1c9521672b315698.zip frameworks_base-d4289922ce772ed8e170a27d1c9521672b315698.tar.gz frameworks_base-d4289922ce772ed8e170a27d1c9521672b315698.tar.bz2 |
Apply ComposeShader's local matrix to children
Change-Id: Idf9b8e7d7b30f8fcd8ba1fd4bfe8991e9ca148e2
Diffstat (limited to 'libs/hwui/SkiaShader.cpp')
-rw-r--r-- | libs/hwui/SkiaShader.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp index 9013fd5..c38eedb 100644 --- a/libs/hwui/SkiaShader.cpp +++ b/libs/hwui/SkiaShader.cpp @@ -411,8 +411,14 @@ void SkiaComposeShader::describe(ProgramDescription& description, const Extensio void SkiaComposeShader::setupProgram(Program* program, const mat4& modelView, const Snapshot& snapshot, GLuint* textureUnit) { - mFirst->setupProgram(program, modelView, snapshot, textureUnit); - mSecond->setupProgram(program, modelView, snapshot, textureUnit); + // Apply this compose shader's local transform and pass it down to + // the child shaders. They will in turn apply their local transform + // to this matrix. + mat4 transform; + computeScreenSpaceMatrix(transform, modelView); + + mFirst->setupProgram(program, transform, snapshot, textureUnit); + mSecond->setupProgram(program, transform, snapshot, textureUnit); } }; // namespace uirenderer |