blob: 22a6e0bd9c39f13af044f7324fde7b8dfa79ce46 [file] [log] [blame]
fmalita2aafe6f2015-02-06 12:51:10 -08001/*
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
11SkCanvas* SkSVGCanvas::Create(const SkRect& bounds, SkXMLWriter* writer) {
12 // TODO: pass full bounds to the device
13 SkISize size = bounds.roundOut().size();
14 SkAutoTUnref<SkBaseDevice> device(SkSVGDevice::Create(size, writer));
15
16 return SkNEW_ARGS(SkCanvas, (device));
17}