Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flow/layers/layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class Layer {
if (paint_bounds_.isEmpty()) {
return false;
}
return !context.internal_nodes_canvas->quickReject(paint_bounds_);
return !context.leaf_nodes_canvas->quickReject(paint_bounds_);
}

uint64_t unique_id() const { return unique_id_; }
Expand Down
1 change: 1 addition & 0 deletions flow/raster_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ std::unique_ptr<RasterCacheResult> RasterCache::RasterizeLayer(
SkISize canvas_size = canvas->getBaseLayerSize();
SkNWayCanvas internal_nodes_canvas(canvas_size.width(),
canvas_size.height());
internal_nodes_canvas.setMatrix(canvas->getTotalMatrix());
internal_nodes_canvas.addCanvas(canvas);
Layer::PaintContext paintContext = {
/* internal_nodes_canvas= */ static_cast<SkCanvas*>(
Expand Down
6 changes: 6 additions & 0 deletions testing/mock_canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,26 @@ void MockCanvas::onClipRect(const SkRect& rect,
ClipEdgeStyle style) {
draw_calls_.emplace_back(
DrawCall{current_layer_, ClipRectData{rect, op, style}});
// quickReject() is handled by base class and needs accurate clip information
SkCanvas::onClipRect(rect, op, style);
}

void MockCanvas::onClipRRect(const SkRRect& rrect,
SkClipOp op,
ClipEdgeStyle style) {
draw_calls_.emplace_back(
DrawCall{current_layer_, ClipRRectData{rrect, op, style}});
// quickReject() is handled by base class and needs accurate clip information
SkCanvas::onClipRRect(rrect, op, style);
}

void MockCanvas::onClipPath(const SkPath& path,
SkClipOp op,
ClipEdgeStyle style) {
draw_calls_.emplace_back(
DrawCall{current_layer_, ClipPathData{path, op, style}});
// quickReject() is handled by base class and needs accurate clip information
SkCanvas::onClipPath(path, op, style);
}

bool MockCanvas::onDoSaveBehind(const SkRect*) {
Expand Down