21class InvalidationController;
26 : fChildren(
std::move(children)) {
27 for (
const auto& child : fChildren) {
33 for (
const auto& child : fChildren) {
39 for (
const auto& child : fChildren) {
47 for (
const auto& child : fChildren) {
54 fChildren.push_back(std::move(node));
60 SkDEBUGCODE(
const auto origSize = fChildren.size());
61 fChildren.erase(
std::remove(fChildren.begin(), fChildren.end(), node), fChildren.end());
62 SkASSERT(fChildren.size() == origSize - 1);
73 for (
const auto& child : fChildren) {
74 child->render(canvas, local_ctx);
79 for (
auto it = fChildren.crbegin(); it != fChildren.crend(); ++it) {
80 if (
const auto* node = (*it)->nodeAt(
p)) {
92 fRequiresIsolation =
false;
94 for (
size_t i = 0;
i < fChildren.size(); ++
i) {
95 const auto child_bounds = fChildren[
i]->revalidate(ic, ctm);
98 if (!fRequiresIsolation &&
i > 0 && child_bounds.intersects(
bounds)) {
101 fRequiresIsolation =
true;
104 for (
size_t j = 0; j <
i; ++ j) {
105 if (child_bounds.intersects(fChildren[
i]->bounds())) {
106 fRequiresIsolation =
true;
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
SkMatrix getTotalMatrix() const
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
void removeChild(const sk_sp< RenderNode > &)
void onRender(SkCanvas *, const RenderContext *) const override
void addChild(sk_sp< RenderNode >)
const RenderNode * onNodeAt(const SkPoint &) const override
void observeInval(const sk_sp< Node > &)
void unobserveInval(const sk_sp< Node > &)
const SkRect & bounds() const
void invalidate(bool damage=true)
ScopedRenderContext && setIsolation(const SkRect &bounds, const SkMatrix &ctm, bool do_isolate)
static constexpr SkRect MakeEmpty()
void join(const SkRect &r)