This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -53,16 +53,17 @@ void RasterCacheResult::draw(DlCanvas& canvas,
53
53
// On some platforms RTree from overlay layers is used for unobstructed
54
54
// platform views and hit testing. To preserve the RTree raster cache must
55
55
// paint individual rects instead of the whole image.
56
- auto rects = rtree_->searchAndConsolidateRects ( kGiantRect );
56
+ auto rects = rtree_->region (). getRects ( true );
57
57
58
58
canvas.Translate (bounds.fLeft , bounds.fTop );
59
59
60
60
SkRect rtree_bounds =
61
61
RasterCacheUtil::GetRoundedOutDeviceBounds (rtree_->bounds (), matrix);
62
62
for (auto rect : rects) {
63
- rect = RasterCacheUtil::GetRoundedOutDeviceBounds (rect, matrix);
64
- rect.offset (-rtree_bounds.fLeft , -rtree_bounds.fTop );
65
- canvas.DrawImageRect (image_, rect, rect,
63
+ SkRect device_rect = RasterCacheUtil::GetRoundedOutDeviceBounds (
64
+ SkRect::Make (rect), matrix);
65
+ device_rect.offset (-rtree_bounds.fLeft , -rtree_bounds.fTop );
66
+ canvas.DrawImageRect (image_, device_rect, device_rect,
66
67
DlImageSampling::kNearestNeighbor , paint);
67
68
}
68
69
}
You can’t perform that action at this time.
0 commit comments