Coverage Report

Created: 2021-08-22 09:07

/src/skia/modules/sksg/src/SkSGGeometryNode.cpp
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2017 Google Inc.
3
 *
4
 * Use of this source code is governed by a BSD-style license that can be
5
 * found in the LICENSE file.
6
 */
7
8
#include "modules/sksg/include/SkSGGeometryNode.h"
9
10
#include "include/core/SkPath.h"
11
12
namespace sksg {
13
14
// Geometry nodes don't generate damage on their own, but via their aggregation ancestor Draw nodes.
15
1.69M
GeometryNode::GeometryNode() : INHERITED(kBubbleDamage_Trait) {}
16
17
5.82k
void GeometryNode::clip(SkCanvas* canvas, bool aa) const {
18
5.82k
    SkASSERT(!this->hasInval());
19
5.82k
    this->onClip(canvas, aa);
20
5.82k
}
21
22
44.5k
void GeometryNode::draw(SkCanvas* canvas, const SkPaint& paint) const {
23
44.5k
    SkASSERT(!this->hasInval());
24
44.5k
    this->onDraw(canvas, paint);
25
44.5k
}
26
27
0
bool GeometryNode::contains(const SkPoint& p) const {
28
0
    SkASSERT(!this->hasInval());
29
0
    return this->bounds().contains(p.x(), p.y()) ? this->onContains(p) : false;
30
0
}
31
32
1.38M
SkPath GeometryNode::asPath() const {
33
1.38M
    SkASSERT(!this->hasInval());
34
1.38M
    return this->onAsPath();
35
1.38M
}
36
37
} // namespace sksg