blob: 8a1550a8f7f4a4e58ed138c8057a4e86cb762f49 [file] [log] [blame]
Florin Malita047ae272017-12-27 11:13:13 -05001/*
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 "SkSGPath.h"
9
10#include "SkCanvas.h"
11#include "SkPaint.h"
12
13namespace sksg {
14
15Path::Path(const SkPath& path) : fPath(path) {}
16
17void Path::onDraw(SkCanvas* canvas, const SkPaint& paint) const {
18 canvas->drawPath(fPath, paint);
19}
20
21SkRect Path::onComputeBounds() const {
22 return fPath.computeTightBounds();
23}
24
25} // namespace sksg