Home
last modified time | relevance | path

Searched refs:SkData (Results 1 – 25 of 173) sorted by relevance

1234567

/external/skia/src/core/
DSkData.cpp15 SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) { in SkData() function in SkData
26 SkData::SkData(size_t size) { in SkData() function in SkData
33 SkData::~SkData() { in ~SkData()
39 bool SkData::equals(const SkData* other) const { in equals()
47 size_t SkData::copyRange(size_t offset, size_t length, void* buffer) const { in copyRange()
62 SkData* SkData::PrivateNewWithCopy(const void* srcOrNull, size_t length) { in PrivateNewWithCopy()
64 return SkData::NewEmpty(); in PrivateNewWithCopy()
67 const size_t actualLength = length + sizeof(SkData); in PrivateNewWithCopy()
74 SkData* data = new (storage) SkData(length); in PrivateNewWithCopy()
83 SK_DECLARE_STATIC_ONCE_PTR(SkData, gEmpty);
[all …]
DSkAnnotation.cpp15 SkAnnotation::SkAnnotation(const char key[], SkData* value) : fKey(key) { in SkAnnotation()
17 value = SkData::NewEmpty(); in SkAnnotation()
28 SkData* SkAnnotation::find(const char key[]) const { in find()
58 static void annotate_paint(SkPaint& paint, const char* key, SkData* value) { in annotate_paint()
62 void SkAnnotateRectWithURL(SkCanvas* canvas, const SkRect& rect, SkData* value) { in SkAnnotateRectWithURL()
71 void SkAnnotateNamedDestination(SkCanvas* canvas, const SkPoint& point, SkData* name) { in SkAnnotateNamedDestination()
80 void SkAnnotateLinkToDestination(SkCanvas* canvas, const SkRect& rect, SkData* name) { in SkAnnotateLinkToDestination()
DSkStream.cpp248 fData.reset(SkData::NewFromFILE(fFILE)); in duplicate()
286 static SkData* newFromParams(const void* src, size_t size, bool copyData) { in newFromParams()
288 return SkData::NewWithCopy(src, size); in newFromParams()
290 return SkData::NewWithoutCopy(src, size); in newFromParams()
295 fData = SkData::NewEmpty(); in SkMemoryStream()
300 fData = SkData::NewUninitialized(size); in SkMemoryStream()
309 SkMemoryStream::SkMemoryStream(SkData* data) { in SkMemoryStream()
311 fData = SkData::NewEmpty(); in SkMemoryStream()
325 fData = SkData::NewFromMalloc(src, size); in setMemoryOwned()
335 SkData* SkMemoryStream::copyToData() const { in copyToData()
[all …]
DSkFlattenableSerialization.cpp14 SkData* SkValidatingSerializeFlattenable(SkFlattenable* flattenable) { in SkValidatingSerializeFlattenable()
18 SkData* data = SkData::NewUninitialized(size); in SkValidatingSerializeFlattenable()
/external/skia/include/core/
DSkData.h22 class SK_API SkData : public SkRefCnt {
69 bool equals(const SkData* other) const;
80 static SkData* NewWithCopy(const void* data, size_t length);
86 static SkData* NewUninitialized(size_t length);
94 static SkData* NewWithCString(const char cstr[]);
100 static SkData* NewWithProc(const void* ptr, size_t length, ReleaseProc proc, void* context);
106 static SkData* NewWithoutCopy(const void* data, size_t length) { in NewWithoutCopy()
114 static SkData* NewFromMalloc(const void* data, size_t length);
120 static SkData* NewFromFileName(const char path[]);
129 static SkData* NewFromFILE(FILE* f);
[all …]
DSkAnnotation.h15 class SkData; variable
28 static SkAnnotation* Create(const char key[], SkData* value) { in Create()
37 SkData* find(const char key[]) const;
42 SkAnnotation(const char key[], SkData* value);
46 SkData* fData;
92 SK_API void SkAnnotateRectWithURL(SkCanvas*, const SkRect&, SkData*);
104 SK_API void SkAnnotateNamedDestination(SkCanvas*, const SkPoint&, SkData*);
117 SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*);
DSkImageEncoder.h17 class SkData; variable
49 SkData* encodeData(const SkBitmap&, int quality);
65 static SkData* EncodeData(const SkImageInfo&, const void* pixels, size_t rowBytes,
67 static SkData* EncodeData(const SkBitmap&, Type, int quality);
69 static SkData* EncodeData(const SkPixmap&, Type, int quality);
DSkImageGenerator.h19 class SkData; variable
55 SK_API bool SkDEPRECATED_InstallDiscardablePixelRef(SkData* encoded, SkBitmap* destination);
80 SkData* refEncodedData(GrContext* ctx = nullptr) {
217 static SkImageGenerator* NewFromEncoded(SkData*);
247 virtual SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM);
275 static SkImageGenerator* NewFromEncodedImpl(SkData*);
DSkImage.h18 class SkData; variable
51 static SkImage* NewRasterData(const Info&, SkData* pixels, size_t rowBytes);
89 static SkImage* NewFromEncoded(SkData* encoded, const SkIRect* subset = NULL);
270 SkData* encode(SkImageEncoder::Type, int quality) const;
286 SkData* encode(SkPixelSerializer* = nullptr) const;
297 SkData* refEncoded() const;
DSkStream.h14 class SkData; variable
277 mutable SkAutoTUnref<SkData> fData;
295 SkMemoryStream(SkData*);
314 SkData* copyToData() const;
321 SkData* setData(SkData*);
344 SkData* fData;
407 SkData* copyToData() const;
420 mutable SkData* fCopy; // is invalidated if we write after it is created
DSkPixelSerializer.h14 class SkData; variable
35 SkData* encode(const SkPixmap& pixmap) { return this->onEncode(pixmap); } in encode()
48 virtual SkData* onEncode(const SkPixmap&) = 0;
/external/skia/tests/
DDataRefTest.cpp152 static void assert_len(skiatest::Reporter* reporter, SkData* ref, size_t len) { in assert_len()
156 static void assert_data(skiatest::Reporter* reporter, SkData* ref, in assert_data()
166 SkAutoTUnref<SkData> r0(SkData::NewWithCopy(str, len + 1)); in test_cstring()
167 SkAutoTUnref<SkData> r1(SkData::NewWithCString(str)); in test_cstring()
171 SkAutoTUnref<SkData> r2(SkData::NewWithCString(nullptr)); in test_cstring()
195 SkAutoTUnref<SkData> r1(SkData::NewFromFILE(file)); in test_files()
201 SkAutoTUnref<SkData> r2(SkData::NewFromFD(fd)); in test_files()
211 SkAutoTUnref<SkData> r0(SkData::NewEmpty()); in DEF_TEST()
212 SkAutoTUnref<SkData> r1(SkData::NewWithCopy(str, strlen(str))); in DEF_TEST()
213 SkAutoTUnref<SkData> r2(SkData::NewWithProc(new int[N], N*sizeof(int), in DEF_TEST()
[all …]
DPDFJpegEmbedTest.cpp18 static SkBitmap bitmap_from_data(SkData* data) { in bitmap_from_data()
25 static bool is_subset_of(SkData* smaller, SkData* larger) { in is_subset_of()
41 static SkData* load_resource( in load_resource()
44 SkData* data = SkData::NewFromFileName(path.c_str()); in load_resource()
59 SkAutoTUnref<SkData> mandrillData( in DEF_TEST()
61 SkAutoTUnref<SkData> cmykData(load_resource(r, test, "CMYK.jpg")); in DEF_TEST()
80 SkAutoTUnref<SkData> pdfData(pdf.copyToData()); in DEF_TEST()
128 SkAutoTUnref<SkData> data( in DEF_TEST()
DImageTest.cpp70 static SkData* create_image_data(SkImageInfo* info) { in create_image_data()
73 SkAutoTUnref<SkData> data(SkData::NewUninitialized(rowBytes * info->height())); in create_image_data()
84 SkAutoTUnref<SkData> data(create_image_data(&info)); in create_data_image()
99 SkAutoTUnref<SkData> fData;
110 SkAutoTUnref<SkData> data(create_image_data(&info)); in create_rasterproc_image()
117 SkAutoTUnref<SkData> data(create_image_data(&info)); in create_codec_image()
120 SkAutoTUnref<SkData> src( in create_codec_image()
136 SkAutoTUnref<SkData> origEncoded(image->encode()); in test_encode()
169 MockSerializer(SkData* (*func)()) : fFunc(func), fDidEncode(false) { } in MockSerializer()
178 SkData* onEncode(const SkPixmap&) override { in onEncode()
[all …]
/external/skia/tools/
DUrlDataManager.h20 bool operator==(const SkData& a, const SkData& b);
31 SkString addData(SkData*, const char* contentType);
36 SkAutoTUnref<SkData> fData;
50 static const SkData& GetKey(const UrlData& data) { in GetKey()
54 static uint32_t Hash(const SkData& key) { in Hash()
71 SkTDynamicHash<UrlData, SkData, LookupTrait> fCache;
Dskdiff_utils.h15 class SkData; variable
21 bool are_buffers_equal(SkData* skdata1, SkData* skdata2);
26 SkData* read_file(const char* file_path);
29 bool get_bitmap(SkData* fileBits, DiffResource& resource, SkImageDecoder::Mode mode);
DUrlDataManager.cpp10 bool operator==(const SkData& a, const SkData& b) { in operator ==()
16 SkString UrlDataManager::addData(SkData* data, const char* contentType) { in addData()
36 SkTDynamicHash<UrlData, SkData, LookupTrait>::Iter iter(&fCache); in reset()
DResources.cpp30 SkAutoTUnref<SkData> resourceData(SkData::NewFromFileName(resourcePath.c_str())); in GetResourceAsBitmap()
37 SkAutoTUnref<SkData> resourceData(SkData::NewFromFileName(path.c_str())); in GetResourceAsImage()
/external/skia/tools/lua/
Dlua_app.cpp22 static SkData* read_into_data(const char file[]) { in read_into_data()
23 SkData* data = SkData::NewFromFileName(file); in read_into_data()
25 data = SkData::NewEmpty(); in read_into_data()
36 SkData* data = nullptr; in tool_main()
/external/skia/gm/
Dcolorcube.cpp73 void make_3Dlut(SkData** data, int size, bool invR, bool invG, bool invB) { in make_3Dlut()
74 *data = SkData::NewUninitialized(sizeof(SkColor) * size * size * size); in make_3Dlut()
130 SkData* f3DLut4;
131 SkData* f3DLut8;
132 SkData* f3DLut16;
133 SkData* f3DLut32;
134 SkData* f3DLut64;
/external/skia/src/codec/
DSkCodecImageGenerator.h21 static SkImageGenerator* NewFromEncodedCodec(SkData* data);
24 SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) override;
37 SkCodecImageGenerator(SkCodec* codec, SkData* data);
40 SkAutoTUnref<SkData> fData;
/external/skia/src/ports/
DSkImageDecoder_empty.cpp103 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) { in EncodeData()
107 SkData* SkImageEncoder::EncodeData(const SkImageInfo&, const void* pixels, size_t rowBytes, in EncodeData()
112 SkData* SkImageEncoder::EncodeData(const SkPixmap&, Type, int) { in EncodeData()
120 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) { in encodeData()
132 SkData* onEncode(const SkPixmap&) override { return nullptr; } in onEncode()
/external/skia/fuzz/
Dfuzz.cpp37 static uint8_t calculate_option(SkData*);
39 static int fuzz_api(SkData*);
40 static int fuzz_img(SkData*, uint8_t, uint8_t);
41 static int fuzz_skp(SkData*);
47 SkAutoTUnref<SkData> bytes(SkData::NewFromFileName(path)); in main()
77 static uint8_t calculate_option(SkData* bytes) { in calculate_option()
86 int fuzz_api(SkData* bytes) { in fuzz_api()
115 int fuzz_img(SkData* bytes, uint8_t scale, uint8_t mode) { in fuzz_img()
358 int fuzz_skp(SkData* bytes) { in fuzz_skp()
379 Fuzz::Fuzz(SkData* bytes) : fBytes(SkSafeRef(bytes)), fNextByte(0) {} in Fuzz()
/external/skia/src/images/
DSkImageEncoder.cpp30 SkData* SkImageEncoder::encodeData(const SkBitmap& bm, int quality) { in encodeData()
51 SkData* SkImageEncoder::EncodeData(const SkBitmap& bm, Type t, int quality) { in EncodeData()
56 SkData* SkImageEncoder::EncodeData(const SkImageInfo& info, const void* pixels, size_t rowBytes, in EncodeData()
66 SkData* SkImageEncoder::EncodeData(const SkPixmap& pixmap, in EncodeData()
80 SkData* onEncode(const SkPixmap& pmap) override { in onEncode()
/external/skia/src/image/
DSkImage_Raster.cpp66 SkImage_Raster(const SkImageInfo&, SkData*, size_t rb, SkColorTable*);
71 SkData* onRefEncoded(GrContext*) const override;
109 SkData* data = static_cast<SkData*>(context); in release_data()
113 SkImage_Raster::SkImage_Raster(const Info& info, SkData* data, size_t rowBytes, in SkImage_Raster()
153 SkData* SkImage_Raster::onRefEncoded(GrContext*) const { in onRefEncoded()
206 SkAutoDataUnref data(SkData::NewWithCopy(pixels, size)); in NewRasterCopy()
211 SkImage* SkImage::NewRasterData(const SkImageInfo& info, SkData* data, size_t rowBytes) { in NewRasterData()
234 SkAutoDataUnref data(SkData::NewWithProc(pixels, size, proc, ctx)); in NewFromRaster()

1234567