gfx/skia/trunk/src/images/SkStreamHelpers.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/images/SkStreamHelpers.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +/*
     1.5 + * Copyright 2013 Google Inc.
     1.6 + *
     1.7 + * Use of this source code is governed by a BSD-style license that can be
     1.8 + * found in the LICENSE file.
     1.9 + */
    1.10 +
    1.11 +#ifndef SkStreamHelpers_DEFINED
    1.12 +#define SkStreamHelpers_DEFINED
    1.13 +
    1.14 +class SkAutoMalloc;
    1.15 +class SkStream;
    1.16 +
    1.17 +/**
    1.18 + *  Copy the provided stream to memory allocated by storage.
    1.19 + *  Used by SkImageDecoder_libbmp and SkImageDecoder_libico.
    1.20 + *  @param storage Allocator to hold the memory. Will be reset to be large
    1.21 + *      enough to hold the entire stream. Upon successful return,
    1.22 + *      storage->get() will point to data holding the SkStream's entire
    1.23 + *      contents.
    1.24 + *  @param stream SkStream to be copied into storage.
    1.25 + *  @return size_t Total number of bytes in the SkStream, which is also the
    1.26 + *      number of bytes pointed to by storage->get(). Returns 0 on failure.
    1.27 + */
    1.28 +size_t CopyStreamToStorage(SkAutoMalloc* storage, SkStream* stream);
    1.29 +
    1.30 +#endif // SkStreamHelpers_DEFINED

mercurial