fmalita | 6ceef3d | 2016-07-26 18:46:34 -0700 | [diff] [blame^] | 1 | /* |
| 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 | |
| 10 | SkSVGContainer::SkSVGContainer(SkSVGTag t) : INHERITED(t) { } |
| 11 | |
| 12 | void SkSVGContainer::appendChild(sk_sp<SkSVGNode> node) { |
| 13 | SkASSERT(node); |
| 14 | fChildren.push_back(std::move(node)); |
| 15 | } |
| 16 | |
| 17 | void 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 | } |