Home | History | Annotate | Download | only in graphics

Lines Matching defs:asset

18 #include <utils/Asset.h>
328 /* make a deep copy of the asset, and return it as a stream, or NULL if there
331 static SkStream* copyAssetToStream(Asset* asset) {
332 // if we could "ref/reopen" the asset, we may not need to copy it here
333 off64_t size = asset->seek(0, SEEK_SET);
335 SkDebugf("---- copyAsset: asset rewind failed\n");
339 size = asset->getLength();
341 SkDebugf("---- copyAsset: asset->getLength() returned %d\n", size);
347 off64_t len = asset->read(data, size);
349 SkDebugf("---- copyAsset: asset->read(%d) returned %d\n", size, len);
357 jint native_asset, // Asset
361 Asset* asset = reinterpret_cast<Asset*>(native_asset);
364 // if we could "ref/reopen" the asset, we may not need to copy it here
366 stream = copyAssetToStream(asset);
371 // since we know we'll be done with the asset when we return, we can
373 stream = new AssetStreamAdaptor(asset);