| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkSVGCanvas.h" | 8 #include "SkSVGCanvas.h" |
| 9 #include "SkSVGDevice.h" | 9 #include "SkSVGDevice.h" |
| 10 | 10 |
| 11 SkCanvas* SkSVGCanvas::Create(const SkRect& bounds, SkXMLWriter* writer) { | 11 SkCanvas* SkSVGCanvas::Create(const SkRect& bounds, SkXMLWriter* writer) { |
| 12 // TODO: pass full bounds to the device | 12 // TODO: pass full bounds to the device |
| 13 SkISize size = bounds.roundOut().size(); | 13 SkISize size = bounds.roundOut().size(); |
| 14 SkAutoTUnref<SkBaseDevice> device(SkSVGDevice::Create(size, writer)); | 14 SkAutoTUnref<SkBaseDevice> device(SkSVGDevice::Create(size, writer)); |
| 15 | 15 |
| 16 return SkNEW_ARGS(SkCanvas, (device)); | 16 return new SkCanvas(device); |
| 17 } | 17 } |
| OLD | NEW |