Home
last modified time | relevance | path

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

1234567891011

/external/skia/src/core/
DSkData.cpp15 SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) { in SkData() function in SkData
25 SkData::SkData(size_t size) { in SkData() function in SkData
32 SkData::~SkData() { in ~SkData()
38 bool SkData::equals(const SkData* other) const { in equals()
46 size_t SkData::copyRange(size_t offset, size_t length, void* buffer) const { in copyRange()
61 sk_sp<SkData> SkData::PrivateNewWithCopy(const void* srcOrNull, size_t length) { in PrivateNewWithCopy()
63 return SkData::MakeEmpty(); in PrivateNewWithCopy()
66 const size_t actualLength = length + sizeof(SkData); in PrivateNewWithCopy()
73 sk_sp<SkData> data(new (storage) SkData(length)); in PrivateNewWithCopy()
80 void SkData::DummyReleaseProc(const void*, void*) {} in DummyReleaseProc()
[all …]
DSkPipe.h36 sk_sp<SkData> writeImage(SkImage*);
37 sk_sp<SkData> writePicture(SkPicture*);
59 sk_sp<SkImage> readImage(const SkData* data) { in readImage()
66 sk_sp<SkPicture> readPicture(const SkData* data) { in readPicture()
89 virtual sk_sp<SkData> serialize(SkTypeface*) = 0;
96 virtual sk_sp<SkData> serialize(SkImage*) = 0;
DSkStream.cpp248 static sk_sp<SkData> newFromParams(const void* src, size_t size, bool copyData) { in newFromParams()
250 return SkData::MakeWithCopy(src, size); in newFromParams()
252 return SkData::MakeWithoutCopy(src, size); in newFromParams()
257 fData = SkData::MakeEmpty(); in SkMemoryStream()
262 fData = SkData::MakeUninitialized(size); in SkMemoryStream()
271 SkMemoryStream::SkMemoryStream(sk_sp<SkData> data) : fData(std::move(data)) { in SkMemoryStream()
273 fData = SkData::MakeEmpty(); in SkMemoryStream()
279 fData = SkData::MakeFromMalloc(src, size); in setMemoryOwned()
288 void SkMemoryStream::setData(sk_sp<SkData> data) { in setData()
290 fData = SkData::MakeEmpty(); in setData()
[all …]
/external/skia/include/core/
DSkData.h22 class SK_API SkData final : public SkNVRefCnt<SkData> {
69 bool equals(const SkData* other) const;
80 static sk_sp<SkData> MakeWithCopy(const void* data, size_t length);
87 static sk_sp<SkData> MakeUninitialized(size_t length);
95 static sk_sp<SkData> MakeWithCString(const char cstr[]);
101 static sk_sp<SkData> MakeWithProc(const void* ptr, size_t length, ReleaseProc proc, void* ctx);
107 static sk_sp<SkData> MakeWithoutCopy(const void* data, size_t length) { in MakeWithoutCopy()
115 static sk_sp<SkData> MakeFromMalloc(const void* data, size_t length);
121 static sk_sp<SkData> MakeFromFileName(const char path[]);
130 static sk_sp<SkData> MakeFromFILE(FILE* f);
[all …]
DSkAnnotation.h13 class SkData; variable
27 SK_API void SkAnnotateRectWithURL(SkCanvas*, const SkRect&, SkData*);
37 SK_API void SkAnnotateNamedDestination(SkCanvas*, const SkPoint&, SkData*);
48 SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*);
DSkImageGenerator.h22 class SkData; variable
44 SkData* refEncodedData() { in refEncodedData()
154 static std::unique_ptr<SkImageGenerator> MakeFromEncoded(sk_sp<SkData>);
173 virtual SkData* onRefEncodedData() { return nullptr; } in onRefEncodedData()
200 static std::unique_ptr<SkImageGenerator> MakeFromEncodedImpl(sk_sp<SkData>);
/external/skia/tests/
DPDFJpegEmbedTest.cpp17 static bool is_subset_of(SkData* smaller, SkData* larger) { in is_subset_of()
33 static sk_sp<SkData> load_resource( in load_resource()
36 sk_sp<SkData> data(SkData::MakeFromFileName(path.c_str())); in load_resource()
52 sk_sp<SkData> mandrillData(load_resource(r, test, "mandrill_512_q075.jpg")); in DEF_TEST()
53 sk_sp<SkData> cmykData(load_resource(r, test, "CMYK.jpg")); in DEF_TEST()
72 sk_sp<SkData> pdfData = pdf.detachAsData(); in DEF_TEST()
97 sk_sp<SkData> data(load_resource(r, "JpegIdentification", kTests[i].path)); in DEF_TEST()
128 auto data = SkData::MakeWithoutCopy(goodJpeg, goodJpegLength); in DEF_TEST()
134 data = SkData::MakeWithoutCopy(goodJpeg, 1); in DEF_TEST()
138 data = SkData::MakeWithoutCopy(goodJpeg, 3); in DEF_TEST()
[all …]
DDataRefTest.cpp122 static void assert_len(skiatest::Reporter* reporter, const sk_sp<SkData>& ref, size_t len) { in assert_len()
126 static void assert_data(skiatest::Reporter* reporter, const sk_sp<SkData>& ref, in assert_data()
136 sk_sp<SkData> r0(SkData::MakeWithCopy(str, len + 1)); in test_cstring()
137 sk_sp<SkData> r1(SkData::MakeWithCString(str)); in test_cstring()
141 sk_sp<SkData> r2(SkData::MakeWithCString(nullptr)); in test_cstring()
165 sk_sp<SkData> r1(SkData::MakeFromFILE(file)); in test_files()
171 sk_sp<SkData> r2(SkData::MakeFromFD(fd)); in test_files()
181 sk_sp<SkData> r0(SkData::MakeEmpty()); in DEF_TEST()
182 sk_sp<SkData> r1(SkData::MakeWithCopy(str, strlen(str))); in DEF_TEST()
183 sk_sp<SkData> r2(SkData::MakeWithProc(new int[N], N*sizeof(int), delete_int_proc, gGlobal)); in DEF_TEST()
[all …]
DAnnotationTest.cpp34 sk_sp<SkData> data(SkData::MakeWithCString("http://www.gooogle.com")); in DEF_TEST()
50 sk_sp<SkData> data(SkData::MakeWithCString("http://www.gooogle.com")); in DEF_TEST()
54 sk_sp<SkData> out = outStream.detachAsData(); in DEF_TEST()
68 sk_sp<SkData> data(SkData::MakeWithCString("example")); in DEF_TEST()
72 sk_sp<SkData> out = outStream.detachAsData(); in DEF_TEST()
DMallocPixelRefTest.cpp36 sk_sp<SkData> data(SkData::MakeUninitialized(size)); in DEF_TEST()
45 sk_sp<SkData> data(SkData::MakeUninitialized(size)); in DEF_TEST()
107 sk_sp<SkData> data(SkData::MakeUninitialized(size)); in DEF_TEST()
108 SkData* dataPtr = data.get(); in DEF_TEST()
DEncodeTest.cpp82 sk_sp<SkData> data0 = dst0.detachAsData(); in test_encode()
83 sk_sp<SkData> data1 = dst1.detachAsData(); in test_encode()
84 sk_sp<SkData> data2 = dst2.detachAsData(); in test_encode()
85 sk_sp<SkData> data3 = dst3.detachAsData(); in test_encode()
160 sk_sp<SkData> data0 = dst0.detachAsData(); in DEF_TEST()
161 sk_sp<SkData> data1 = dst1.detachAsData(); in DEF_TEST()
162 sk_sp<SkData> data2 = dst2.detachAsData(); in DEF_TEST()
274 sk_sp<SkData> data0 = dst0.detachAsData(); in DEF_TEST()
275 sk_sp<SkData> data1 = dst1.detachAsData(); in DEF_TEST()
276 sk_sp<SkData> data2 = dst2.detachAsData(); in DEF_TEST()
[all …]
DICCTest.cpp42 sk_sp<SkData> data = SkData::MakeFromFileName( in DEF_TEST()
52 data = SkData::MakeFromFileName( GetResourcePath("icc_profiles/HP_Z32x.icc").c_str()); in DEF_TEST()
56 data = SkData::MakeFromFileName(GetResourcePath("icc_profiles/upperLeft.icc").c_str()); in DEF_TEST()
60 data = SkData::MakeFromFileName(GetResourcePath("icc_profiles/upperRight.icc").c_str()); in DEF_TEST()
85 sk_sp<SkData> data = SkData::MakeFromFileName( in DEF_TEST()
90 data = SkData::MakeFromFileName( GetResourcePath("icc_profiles/HP_Z32x.icc").c_str()); in DEF_TEST()
94 data = SkData::MakeFromFileName(GetResourcePath("icc_profiles/upperLeft.icc").c_str()); in DEF_TEST()
98 data = SkData::MakeFromFileName(GetResourcePath("icc_profiles/upperRight.icc").c_str()); in DEF_TEST()
106 sk_sp<SkData> profile = SkICC::WriteToICC(fn, toXYZD50); in test_write_icc()
/external/skia/tools/
DUrlDataManager.h20 bool operator==(const SkData& a, const SkData& b);
31 SkString addData(SkData*, const char* contentType);
36 sk_sp<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;
DResources.cpp31 sk_sp<SkData> resourceData(SkData::MakeFromFileName(resourcePath.c_str())); in GetResourceAsBitmap()
43 sk_sp<SkData> resourceData(SkData::MakeFromFileName(path.c_str())); in GetResourceAsImage()
57 sk_sp<SkData> GetResourceAsData(const char* resource) { in GetResourceAsData()
59 return SkData::MakeFromFileName(resourcePath.c_str()); in GetResourceAsData()
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()
/external/skia/fuzz/
Dfuzz.cpp52 static uint8_t calculate_option(SkData*);
54 static void fuzz_api(sk_sp<SkData>);
55 static void fuzz_color_deserialize(sk_sp<SkData>);
56 static void fuzz_icc(sk_sp<SkData>);
57 static void fuzz_img(sk_sp<SkData>, uint8_t, uint8_t);
58 static void fuzz_path_deserialize(sk_sp<SkData>);
59 static void fuzz_region_deserialize(sk_sp<SkData>);
60 static void fuzz_skp(sk_sp<SkData>);
61 static void fuzz_filter_fuzz(sk_sp<SkData>);
64 static void fuzz_sksl2glsl(sk_sp<SkData>);
[all …]
/external/skia/src/codec/
DSkStreamBuffer.cpp19 fMarkedData.foreach([](size_t, SkData** data) { (*data)->unref(); }); in ~SkStreamBuffer()
60 sk_sp<SkData> data(SkData::MakeWithCopy(fBuffer, fBytesBuffered)); in markPosition()
67 sk_sp<SkData> SkStreamBuffer::getDataAtPosition(size_t position, size_t length) { in getDataAtPosition()
69 SkData** data = fMarkedData.find(position); in getDataAtPosition()
72 return sk_ref_sp<SkData>(*data); in getDataAtPosition()
82 sk_sp<SkData> data(SkData::MakeUninitialized(length)); in getDataAtPosition()
DSkCodecImageGenerator.h21 static std::unique_ptr<SkImageGenerator> MakeFromEncodedCodec(sk_sp<SkData>);
24 SkData* onRefEncodedData() override;
37 SkCodecImageGenerator(SkCodec* codec, sk_sp<SkData>);
40 sk_sp<SkData> fData;
/external/skia/tools/skiaserve/
DRequest.h41 sk_sp<SkData> drawToPng(int n, int m = -1);
42 sk_sp<SkData> writeOutSkp();
54 sk_sp<SkData> getJsonOps(int n);
57 sk_sp<SkData> getJsonOpList(int n);
60 sk_sp<SkData> getJsonInfo(int n);
70 sk_sp<SkData> writeCanvasToPng(SkCanvas* canvas);
DRequest.cpp57 sk_sp<SkData> Request::writeCanvasToPng(SkCanvas* canvas) { in writeCanvasToPng()
63 sk_sp<SkData> encodedBitmap = sk_tools::encode_bitmap_for_png(*bmp); in writeCanvasToPng()
105 sk_sp<SkData> Request::drawToPng(int n, int m) { in drawToPng()
112 sk_sp<SkData> Request::writeOutSkp() { in writeOutSkp()
266 sk_sp<SkData> Request::getJsonOps(int n) { in getJsonOps()
278 sk_sp<SkData> Request::getJsonOpList(int n) { in getJsonOpList()
290 sk_sp<SkData> Request::getJsonInfo(int n) { in getJsonInfo()
308 return SkData::MakeWithCopy(json.c_str(), strlen(json.c_str())); in getJsonInfo()
318 sk_sp<SkData> encodedBitmap = sk_tools::encode_bitmap_for_png(*bitmap); in getPixel()
/external/skia/tools/skdiff/
Dskdiff_utils.h14 class SkData; variable
20 bool are_buffers_equal(SkData* skdata1, SkData* skdata2);
25 sk_sp<SkData> read_file(const char* file_path);
28 bool get_bitmap(sk_sp<SkData> fileBits, DiffResource& resource, bool sizeOnly);
/external/skia/tools/lua/
Dlua_app.cpp22 static sk_sp<SkData> read_into_data(const char file[]) { in read_into_data()
23 sk_sp<SkData> data(SkData::MakeFromFileName(file)); in read_into_data()
25 data = SkData::MakeEmpty(); in read_into_data()
35 sk_sp<SkData> data; in main()
/external/skia/src/ports/
DSkImageGeneratorCG.h22 static SkImageGenerator* NewFromEncodedCG(SkData* data);
25 SkData* onRefEncodedData() override;
35 SkImageGeneratorCG(const SkImageInfo& info, const void* imageSrc, SkData* data);
38 sk_sp<SkData> fData;
DSkImageGeneratorWIC.h39 static SkImageGenerator* NewFromEncodedWIC(SkData* data);
42 SkData* onRefEncodedData() override;
54 IWICBitmapSource* imageSource, SkData* data);
58 sk_sp<SkData> fData;
/external/skia/samplecode/
DDecodeFile.h19 sk_sp<SkData> data(SkData::MakeFromFileName(filename));
38 sk_sp<SkData> data(SkData::MakeFromFileName(filename)); in decode_file()

1234567891011