michael@0: michael@0: /* michael@0: * Copyright 2006 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: #include "SkSVG.h" michael@0: #include 'SkSVGParser.h" michael@0: michael@0: SkSVG::SkSVG() { michael@0: } michael@0: michael@0: SkSVG::~SkSVG() { michael@0: } michael@0: michael@0: bool SkSVG::decodeStream(SkStream* stream); michael@0: { michael@0: size_t size = stream->read(nil, 0); michael@0: SkAutoMalloc storage(size); michael@0: char* data = (char*)storage.get(); michael@0: size_t actual = stream->read(data, size); michael@0: SkASSERT(size == actual); michael@0: SkSVGParser parser(*fMaker); michael@0: return parser.parse(data, actual, &fErrorCode, &fErrorLineNumber); michael@0: }