Loading libs/hwui/OpenGLRenderer.cpp +7 −6 Original line number Diff line number Diff line Loading @@ -1217,17 +1217,18 @@ void OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int #if RENDER_LAYERS_AS_REGIONS // Mark the current layer dirty where we are going to draw the patch if (hasLayer() && mesh->hasEmptyQuads) { const float offsetX = left + mSnapshot->transform->getTranslateX(); const float offsetY = top + mSnapshot->transform->getTranslateY(); const size_t count = mesh->quads.size(); for (size_t i = 0; i < count; i++) { const Rect& bounds = mesh->quads.itemAt(i); if (pureTranslate) { const float x = (int) floorf(bounds.left + 0.5f); const float y = (int) floorf(bounds.top + 0.5f); dirtyLayer(x, y, x + bounds.getWidth(), y + bounds.getHeight(), *mSnapshot->transform); const float x = (int) floorf(bounds.left + offsetX + 0.5f); const float y = (int) floorf(bounds.top + offsetY + 0.5f); dirtyLayer(x, y, x + bounds.getWidth(), y + bounds.getHeight()); } else { dirtyLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, *mSnapshot->transform); dirtyLayer(left + bounds.left, top + bounds.top, left + bounds.right, top + bounds.bottom, *mSnapshot->transform); } } } Loading Loading
libs/hwui/OpenGLRenderer.cpp +7 −6 Original line number Diff line number Diff line Loading @@ -1217,17 +1217,18 @@ void OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int #if RENDER_LAYERS_AS_REGIONS // Mark the current layer dirty where we are going to draw the patch if (hasLayer() && mesh->hasEmptyQuads) { const float offsetX = left + mSnapshot->transform->getTranslateX(); const float offsetY = top + mSnapshot->transform->getTranslateY(); const size_t count = mesh->quads.size(); for (size_t i = 0; i < count; i++) { const Rect& bounds = mesh->quads.itemAt(i); if (pureTranslate) { const float x = (int) floorf(bounds.left + 0.5f); const float y = (int) floorf(bounds.top + 0.5f); dirtyLayer(x, y, x + bounds.getWidth(), y + bounds.getHeight(), *mSnapshot->transform); const float x = (int) floorf(bounds.left + offsetX + 0.5f); const float y = (int) floorf(bounds.top + offsetY + 0.5f); dirtyLayer(x, y, x + bounds.getWidth(), y + bounds.getHeight()); } else { dirtyLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, *mSnapshot->transform); dirtyLayer(left + bounds.left, top + bounds.top, left + bounds.right, top + bounds.bottom, *mSnapshot->transform); } } } Loading