Lines Matching defs:asset
461 /* make a deep copy of the asset, and return it as a stream, or NULL if there
464 static SkStream* copyAssetToStream(Asset* asset) {
465 // if we could "ref/reopen" the asset, we may not need to copy it here
466 off64_t size = asset->seek(0, SEEK_SET);
468 SkDebugf("---- copyAsset: asset rewind failed\n");
472 size = asset->getLength();
474 SkDebugf("---- copyAsset: asset->getLength() returned %d\n", size);
480 off64_t len = asset->read(data, size);
482 SkDebugf("---- copyAsset: asset->read(%d) returned %d\n", size, len);
493 Asset* asset = reinterpret_cast<Asset*>(native_asset);
496 // if we could "ref/reopen" the asset, we may not need to copy it here
498 stream = copyAssetToStream(asset);
503 // since we know we'll be done with the asset when we return, we can
505 stream = new AssetStreamAdaptor(asset);