blob: f8667975bd08e1603f2489ba69967aa1e379ca90 [file] [log] [blame]
fmalita6ceef3d2016-07-26 18:46:34 -07001/*
2 * Copyright 2016 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 "SkSVGContainer.h"
9
10SkSVGContainer::SkSVGContainer(SkSVGTag t) : INHERITED(t) { }
11
12void SkSVGContainer::appendChild(sk_sp<SkSVGNode> node) {
13 SkASSERT(node);
14 fChildren.push_back(std::move(node));
15}
16
17void SkSVGContainer::onRender(SkCanvas* canvas, const SkSVGRenderContext& ctx) const {
18 for (int i = 0; i < fChildren.count(); ++i) {
19 fChildren[i]->render(canvas, ctx);
20 }
21}