OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkAtomics.h" | 8 #include "SkAtomics.h" |
9 #include "SkImageGenerator.h" | 9 #include "SkImageGenerator.h" |
10 #include "SkMessageBus.h" | 10 #include "SkMessageBus.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 SkAutoTDelete<SkPictureData> data(SkPictureData::CreateFromBuffer(buffer, in
fo)); | 174 SkAutoTDelete<SkPictureData> data(SkPictureData::CreateFromBuffer(buffer, in
fo)); |
175 return Forwardport(info, data, &buffer); | 175 return Forwardport(info, data, &buffer); |
176 } | 176 } |
177 | 177 |
178 SkPictureData* SkPicture::backport() const { | 178 SkPictureData* SkPicture::backport() const { |
179 SkPictInfo info = this->createHeader(); | 179 SkPictInfo info = this->createHeader(); |
180 SkPictureRecord rec(SkISize::Make(info.fCullRect.width(), info.fCullRect.hei
ght()), 0/*flags*/); | 180 SkPictureRecord rec(SkISize::Make(info.fCullRect.width(), info.fCullRect.hei
ght()), 0/*flags*/); |
181 rec.beginRecording(); | 181 rec.beginRecording(); |
182 this->playback(&rec); | 182 this->playback(&rec); |
183 rec.endRecording(); | 183 rec.endRecording(); |
184 return new SkPictureData(rec, info, false /*deep copy ops?*/); | 184 return new SkPictureData(rec, info); |
185 } | 185 } |
186 | 186 |
187 void SkPicture::serialize(SkWStream* stream, SkPixelSerializer* pixelSerializer)
const { | 187 void SkPicture::serialize(SkWStream* stream, SkPixelSerializer* pixelSerializer)
const { |
188 this->serialize(stream, pixelSerializer, nullptr); | 188 this->serialize(stream, pixelSerializer, nullptr); |
189 } | 189 } |
190 | 190 |
191 void SkPicture::serialize(SkWStream* stream, | 191 void SkPicture::serialize(SkWStream* stream, |
192 SkPixelSerializer* pixelSerializer, | 192 SkPixelSerializer* pixelSerializer, |
193 SkRefCntSet* typefaceSet) const { | 193 SkRefCntSet* typefaceSet) const { |
194 SkPictInfo info = this->createHeader(); | 194 SkPictInfo info = this->createHeader(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 } | 228 } |
229 | 229 |
230 // Global setting to disable security precautions for serialization. | 230 // Global setting to disable security precautions for serialization. |
231 void SkPicture::SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set) { | 231 void SkPicture::SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set) { |
232 g_AllPictureIOSecurityPrecautionsEnabled = set; | 232 g_AllPictureIOSecurityPrecautionsEnabled = set; |
233 } | 233 } |
234 | 234 |
235 bool SkPicture::PictureIOSecurityPrecautionsEnabled() { | 235 bool SkPicture::PictureIOSecurityPrecautionsEnabled() { |
236 return g_AllPictureIOSecurityPrecautionsEnabled; | 236 return g_AllPictureIOSecurityPrecautionsEnabled; |
237 } | 237 } |
OLD | NEW |