Lines Matching full:info

60     SkPictInfo info;  in createHeader()  local
63 static_assert(sizeof(kMagic) == sizeof(info.fMagic), ""); in createHeader()
64 memcpy(info.fMagic, kMagic, sizeof(kMagic)); in createHeader()
66 // Set picture info after magic bytes in the header in createHeader()
67 info.fVersion = CURRENT_PICTURE_VERSION; in createHeader()
68 info.fCullRect = this->cullRect(); in createHeader()
69 info.fFlags = SkPictInfo::kCrossProcess_Flag; in createHeader()
71 info.fFlags |= SkPictInfo::kScalarIsFloat_Flag; in createHeader()
74 info.fFlags |= SkPictInfo::kPtrIs64Bit_Flag; in createHeader()
76 return info; in createHeader()
79 bool SkPicture::IsValidPictInfo(const SkPictInfo& info) { in IsValidPictInfo() argument
80 if (0 != memcmp(info.fMagic, kMagic, sizeof(kMagic))) { in IsValidPictInfo()
83 if (info.fVersion < MIN_PICTURE_VERSION || info.fVersion > CURRENT_PICTURE_VERSION) { in IsValidPictInfo()
94 SkPictInfo info; in InternalOnly_StreamIsSKP() local
95 SkASSERT(sizeof(kMagic) == sizeof(info.fMagic)); in InternalOnly_StreamIsSKP()
96 if (!stream->read(&info.fMagic, sizeof(kMagic))) { in InternalOnly_StreamIsSKP()
100 info.fVersion = stream->readU32(); in InternalOnly_StreamIsSKP()
101 info.fCullRect.fLeft = stream->readScalar(); in InternalOnly_StreamIsSKP()
102 info.fCullRect.fTop = stream->readScalar(); in InternalOnly_StreamIsSKP()
103 info.fCullRect.fRight = stream->readScalar(); in InternalOnly_StreamIsSKP()
104 info.fCullRect.fBottom = stream->readScalar(); in InternalOnly_StreamIsSKP()
105 info.fFlags = stream->readU32(); in InternalOnly_StreamIsSKP()
107 if (IsValidPictInfo(info)) { in InternalOnly_StreamIsSKP()
108 if (pInfo) { *pInfo = info; } in InternalOnly_StreamIsSKP()
115 SkPictInfo info; in InternalOnly_BufferIsSKP() local
116 SkASSERT(sizeof(kMagic) == sizeof(info.fMagic)); in InternalOnly_BufferIsSKP()
117 if (!buffer->readByteArray(&info.fMagic, sizeof(kMagic))) { in InternalOnly_BufferIsSKP()
121 info.fVersion = buffer->readUInt(); in InternalOnly_BufferIsSKP()
122 buffer->readRect(&info.fCullRect); in InternalOnly_BufferIsSKP()
123 info.fFlags = buffer->readUInt(); in InternalOnly_BufferIsSKP()
125 if (IsValidPictInfo(info)) { in InternalOnly_BufferIsSKP()
126 if (pInfo) { *pInfo = info; } in InternalOnly_BufferIsSKP()
132 SkPicture* SkPicture::Forwardport(const SkPictInfo& info, const SkPictureData* data) { in Forwardport() argument
138 playback.draw(r.beginRecording(info.fCullRect), nullptr/*no callback*/); in Forwardport()
159 SkPictInfo info; in CreateFromStream() local
160 if (!InternalOnly_StreamIsSKP(stream, &info) || !stream->readBool()) { in CreateFromStream()
164 SkPictureData::CreateFromStream(stream, info, proc, typefaces)); in CreateFromStream()
165 return Forwardport(info, data); in CreateFromStream()
169 SkPictInfo info; in CreateFromBuffer() local
170 if (!InternalOnly_BufferIsSKP(&buffer, &info) || !buffer.readBool()) { in CreateFromBuffer()
173 SkAutoTDelete<SkPictureData> data(SkPictureData::CreateFromBuffer(buffer, info)); in CreateFromBuffer()
174 return Forwardport(info, data); in CreateFromBuffer()
178 SkPictInfo info = this->createHeader(); in backport() local
179 SkPictureRecord rec(SkISize::Make(info.fCullRect.width(), info.fCullRect.height()), 0/*flags*/); in backport()
183 return new SkPictureData(rec, info, false /*deep copy ops?*/); in backport()
193 SkPictInfo info = this->createHeader(); in serialize() local
196 stream->write(&info, sizeof(info)); in serialize()
206 SkPictInfo info = this->createHeader(); in flatten() local
209 buffer.writeByteArray(&info.fMagic, sizeof(info.fMagic)); in flatten()
210 buffer.writeUInt(info.fVersion); in flatten()
211 buffer.writeRect(info.fCullRect); in flatten()
212 buffer.writeUInt(info.fFlags); in flatten()