skia2/experimental/sksg/SkSGGeometryNode.cpp
Florin Malita 38ea40eb75 [skottie] Layer clip support
TBR=

Change-Id: Ibf65efc69031f8f6e19f4f28cccab29c357e704d
Reviewed-on: https://skia-review.googlesource.com/101540
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-29 21:57:44 +00:00

33 lines
771 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 "SkSGGeometryNode.h"
#include "SkPath.h"
namespace sksg {
// Geometry nodes don't generate damage on their own, but via their aggregation ancestor Draw nodes.
GeometryNode::GeometryNode() : INHERITED(kBubbleDamage_Trait) {}
void GeometryNode::clip(SkCanvas* canvas, bool aa) const {
SkASSERT(!this->hasInval());
this->onClip(canvas, aa);
}
void GeometryNode::draw(SkCanvas* canvas, const SkPaint& paint) const {
SkASSERT(!this->hasInval());
this->onDraw(canvas, paint);
}
SkPath GeometryNode::asPath() const {
SkASSERT(!this->hasInval());
return this->onAsPath();
}
} // namespace sksg