1 /*
2  * Copyright 2018 Google LLC
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #include "SkCanvas.h"
9 #include "SkData.h"
10 #include "SkDrawable.h"
11 #include "SkImageGenerator.h"
12 #include "SkPicture.h"
13 #include "SkPictureData.h"
14 #include "SkPictureImageFilter.h"
15 #include "SkPicturePlayback.h"
16 #include "SkPicturePriv.h"
17 #include "SkPictureRecorder.h"
18 #include "SkPictureShader.h"
19 #include "SkRecordedDrawable.h"
20 #include "SkTypes.h"
21 
SkPicture()22 SkPicture::SkPicture() : fUniqueID(0) {}
23 
24 
MakeFromBuffer(SkReadBuffer & buffer)25 sk_sp<SkPicture> SkPicturePriv::MakeFromBuffer(SkReadBuffer& buffer) {
26     return nullptr;
27 }
28 
Flatten(const sk_sp<const SkPicture> picture,SkWriteBuffer & buffer)29 void SkPicturePriv::Flatten(const sk_sp<const SkPicture> picture, SkWriteBuffer& buffer) {}
30 
31 
SkPictureRecorder()32 SkPictureRecorder::SkPictureRecorder() {}
33 
~SkPictureRecorder()34 SkPictureRecorder::~SkPictureRecorder() {}
35 
beginRecording(const SkRect & userCullRect,SkBBHFactory * bbhFactory,uint32_t recordFlags)36 SkCanvas* SkPictureRecorder::beginRecording(const SkRect& userCullRect,
37                                             SkBBHFactory* bbhFactory /* = nullptr */,
38                                             uint32_t recordFlags /* = 0 */) {
39     return nullptr;
40 }
41 
getRecordingCanvas()42 SkCanvas* SkPictureRecorder::getRecordingCanvas() {
43     return nullptr;
44 }
45 
finishRecordingAsPicture(uint32_t finishFlags)46 sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPicture(uint32_t finishFlags) {
47     return nullptr;
48 }
49 
finishRecordingAsPictureWithCull(const SkRect & cullRect,uint32_t finishFlags)50 sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPictureWithCull(const SkRect& cullRect,
51                                                                      uint32_t finishFlags) {
52     return nullptr;
53 }
54 
partialReplay(SkCanvas * canvas) const55 void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {}
56 
finishRecordingAsDrawable(uint32_t finishFlags)57 sk_sp<SkDrawable> SkPictureRecorder::finishRecordingAsDrawable(uint32_t finishFlags) {
58     return nullptr;
59 }
60 
61 
CreateFromStream(SkStream * stream,const SkPictInfo & info,const SkDeserialProcs & procs,SkTypefacePlayback * topLevelTFPlayback)62 SkPictureData* SkPictureData::CreateFromStream(SkStream* stream,
63                                                const SkPictInfo& info,
64                                                const SkDeserialProcs& procs,
65                                                SkTypefacePlayback* topLevelTFPlayback) {
66     return nullptr;
67 }
68 
CreateFromBuffer(SkReadBuffer & buffer,const SkPictInfo & info)69 SkPictureData* SkPictureData::CreateFromBuffer(SkReadBuffer& buffer,
70                                                const SkPictInfo& info) {
71     return nullptr;
72 }
73 
74 
CreateProc(SkReadBuffer & buffer)75 sk_sp<SkFlattenable> SkPictureShader::CreateProc(SkReadBuffer& buffer) {
76     return nullptr;
77 }
78 
flatten(SkWriteBuffer & buffer) const79 void SkPictureShader::flatten(SkWriteBuffer& buffer) const {}
80 
81 
draw(SkCanvas * canvas,SkPicture::AbortCallback * callback,SkReadBuffer * buffer)82 void SkPicturePlayback::draw(SkCanvas* canvas,
83                              SkPicture::AbortCallback* callback,
84                              SkReadBuffer* buffer) {}
85 
86 
87 std::unique_ptr<SkImageGenerator>
MakeFromPicture(const SkISize & size,sk_sp<SkPicture> picture,const SkMatrix * matrix,const SkPaint * paint,SkImage::BitDepth bitDepth,sk_sp<SkColorSpace> colorSpace)88 SkImageGenerator::MakeFromPicture(const SkISize& size, sk_sp<SkPicture> picture,
89                                   const SkMatrix* matrix, const SkPaint* paint,
90                                   SkImage::BitDepth bitDepth, sk_sp<SkColorSpace> colorSpace) {
91     return nullptr;
92 }
93 
flatten(SkWriteBuffer & buffer) const94 void SkRecordedDrawable::flatten(SkWriteBuffer& buffer) const {}
95 
CreateProc(SkReadBuffer & buffer)96 sk_sp<SkFlattenable> SkRecordedDrawable::CreateProc(SkReadBuffer& buffer) {
97     return nullptr;
98 }
99 
100 
CreateProc(SkReadBuffer & buffer)101 sk_sp<SkFlattenable> SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) {
102     return nullptr;
103 }
104