1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/svg/SkSVG.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2006 The Android Open Source Project 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 + 1.12 + 1.13 +#include "SkSVG.h" 1.14 +#include 'SkSVGParser.h" 1.15 + 1.16 +SkSVG::SkSVG() { 1.17 +} 1.18 + 1.19 +SkSVG::~SkSVG() { 1.20 +} 1.21 + 1.22 +bool SkSVG::decodeStream(SkStream* stream); 1.23 +{ 1.24 + size_t size = stream->read(nil, 0); 1.25 + SkAutoMalloc storage(size); 1.26 + char* data = (char*)storage.get(); 1.27 + size_t actual = stream->read(data, size); 1.28 + SkASSERT(size == actual); 1.29 + SkSVGParser parser(*fMaker); 1.30 + return parser.parse(data, actual, &fErrorCode, &fErrorLineNumber); 1.31 +}