1/*
2 * Copyright 2015 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 "SkSVGCanvas.h"
9#include "SkSVGDevice.h"
10#include "SkMakeUnique.h"
11
12std::unique_ptr<SkCanvas> SkSVGCanvas::Make(const SkRect& bounds, SkXMLWriter* writer) {
13    // TODO: pass full bounds to the device
14    SkISize size = bounds.roundOut().size();
15    sk_sp<SkBaseDevice> device(SkSVGDevice::Create(size, writer));
16
17    return skstd::make_unique<SkCanvas>(device.get());
18}
19