diff options
| author | 2011-07-08 11:57:29 -0700 | |
|---|---|---|
| committer | 2011-07-08 11:57:29 -0700 | |
| commit | b2479153b743df9e54f7e17c7132a5ecd87fa453 (patch) | |
| tree | 9c57ccc10e57d9743dfa0bbc92b41ba0a060c85b /libs/hwui/OpenGLRenderer.cpp | |
| parent | cfacbeadffb5dccbf0434d9c05b19430a5237c3b (diff) | |
Correctly position layers.
Change-Id: I1678b1c5bdab140b44e56556c50ab8329255f18a
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 06e3b290653e..a349121ba7a5 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -673,11 +673,11 @@ void OpenGLRenderer::composeLayerRect(Layer* layer, const Rect& rect, bool swap) float x = rect.left; float y = rect.top; - bool simpleTransform = mSnapshot->transform->isPureTranslate(); - - if (simpleTransform && + bool simpleTransform = mSnapshot->transform->isPureTranslate() && layer->getWidth() == (uint32_t) rect.getWidth() && - layer->getHeight() == (uint32_t) rect.getHeight()) { + layer->getHeight() == (uint32_t) rect.getHeight(); + + if (simpleTransform) { // When we're swapping, the layer is already in screen coordinates if (!swap) { x = (int) floorf(rect.left + mSnapshot->transform->getTranslateX() + 0.5f); |