Return identity matrix when rendering in an FBO.

Change-Id: I57438e745b30c8cfe16c269f3cafcd719049d705
This commit is contained in:
Romain Guy
2010-10-13 15:17:00 -07:00
parent bbf68c6ad2
commit 99bcdc52dc
2 changed files with 7 additions and 1 deletions

View File

@@ -585,7 +585,10 @@ void OpenGLRenderer::setMatrix(SkMatrix* matrix) {
}
const float* OpenGLRenderer::getMatrix() const {
return &mSnapshot->transform->data[0];
if (mSnapshot->fbo != 0) {
return &mSnapshot->transform->data[0];
}
return &mIdentity.data[0];
}
void OpenGLRenderer::getMatrix(SkMatrix* matrix) {

View File

@@ -432,6 +432,9 @@ private:
// Misc
GLint mMaxTextureSize;
// Indentity matrix
const mat4 mIdentity;
friend class DisplayListRenderer;
}; // class OpenGLRenderer