3ba3fa72ae
... to avoid having too many Node friends. TBR= Change-Id: I8f8ff570d94ea48017935066a3d51cd8265ec120 Reviewed-on: https://skia-review.googlesource.com/97980 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
32 lines
635 B
C++
32 lines
635 B
C++
/*
|
|
* Copyright 2017 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "SkSGEffectNode.h"
|
|
|
|
namespace sksg {
|
|
|
|
EffectNode::EffectNode(sk_sp<RenderNode> child)
|
|
: fChild(std::move(child)) {
|
|
this->observeInval(fChild);
|
|
}
|
|
|
|
EffectNode::~EffectNode() {
|
|
this->unobserveInval(fChild);
|
|
}
|
|
|
|
void EffectNode::onRender(SkCanvas* canvas) const {
|
|
fChild->render(canvas);
|
|
}
|
|
|
|
SkRect EffectNode::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) {
|
|
SkASSERT(this->hasInval());
|
|
|
|
return fChild->revalidate(ic, ctm);
|
|
}
|
|
|
|
} // namespace sksg
|