| 775 | } |
| 776 | |
| 777 | void DisplayList::drawTileTask(const DrawTask& task) const { |
| 778 | auto surface = surfaceCaches[task.sourceIndex()].get(); |
| 779 | DEBUG_ASSERT(surface != nullptr); |
| 780 | auto canvas = surface->getCanvas(); |
| 781 | AutoCanvasRestore autoRestore(canvas); |
| 782 | auto currentZoomScale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision); |
| 783 | DEBUG_ASSERT(currentZoomScale != 0.0f); |
| 784 | auto viewMatrix = Matrix::MakeScale(currentZoomScale); |
| 785 | auto& tileRect = task.tileRect(); |
| 786 | auto& sourceRect = task.sourceRect(); |
| 787 | auto offsetX = sourceRect.left - tileRect.left; |
| 788 | auto offsetY = sourceRect.top - tileRect.top; |
| 789 | viewMatrix.postTranslate(offsetX, offsetY); |
| 790 | auto clipRect = tileRect; |
| 791 | clipRect.offset(offsetX, offsetY); |
| 792 | drawRootLayer(surface, clipRect, viewMatrix, true); |
| 793 | } |
| 794 | |
| 795 | void DisplayList::drawScreenTasks(std::vector<DrawTask> screenTasks, Surface* surface, |
| 796 | bool autoClear) const { |
nothing calls this directly
no test coverage detected