aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-12-20 14:09:20 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-20 19:32:36 +0000
commite7a58321bbbe094ca0f9b03e25843f7666d5c198 (patch)
treeb94ae7763971fc8243369323c68d34864c265123 /src
parent2a7f0aa9ebfd66c902dcf1a0ca86ced9fde60d5a (diff)
make InternalOnly_ functions actually private
Bug: skia: Change-Id: Id06ad4283a0cd9835b3349c783b705b30435855a Reviewed-on: https://skia-review.googlesource.com/87980 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/SkPicture.cpp11
-rw-r--r--src/core/SkPictureCommon.h2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 4642f48c55..b163a166d4 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -86,7 +86,7 @@ bool SkPicture::IsValidPictInfo(const SkPictInfo& info) {
return true;
}
-bool SkPicture::InternalOnly_StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) {
+bool SkPicture::StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) {
if (!stream) {
return false;
}
@@ -110,8 +110,11 @@ bool SkPicture::InternalOnly_StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) {
}
return false;
}
+bool SkPicture_StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) {
+ return SkPicture::StreamIsSKP(stream, pInfo);
+}
-bool SkPicture::InternalOnly_BufferIsSKP(SkReadBuffer* buffer, SkPictInfo* pInfo) {
+bool SkPicture::BufferIsSKP(SkReadBuffer* buffer, SkPictInfo* pInfo) {
SkPictInfo info;
SkASSERT(sizeof(kMagic) == sizeof(info.fMagic));
if (!buffer->readByteArray(&info.fMagic, sizeof(kMagic))) {
@@ -181,7 +184,7 @@ sk_sp<SkPicture> SkPicture::MakeFromStream(SkStream* stream, const SkDeserialPro
sk_sp<SkPicture> SkPicture::MakeFromStream(SkStream* stream, const SkDeserialProcs& procs,
SkTypefacePlayback* typefaces) {
SkPictInfo info;
- if (!InternalOnly_StreamIsSKP(stream, &info)) {
+ if (!StreamIsSKP(stream, &info)) {
return nullptr;
}
@@ -211,7 +214,7 @@ sk_sp<SkPicture> SkPicture::MakeFromStream(SkStream* stream, const SkDeserialPro
sk_sp<SkPicture> SkPicture::MakeFromBuffer(SkReadBuffer& buffer) {
SkPictInfo info;
- if (!InternalOnly_BufferIsSKP(&buffer, &info)) {
+ if (!BufferIsSKP(&buffer, &info)) {
return nullptr;
}
// size should be 0, 1, or negative
diff --git a/src/core/SkPictureCommon.h b/src/core/SkPictureCommon.h
index 23d43fd65b..39f816afc9 100644
--- a/src/core/SkPictureCommon.h
+++ b/src/core/SkPictureCommon.h
@@ -144,4 +144,6 @@ struct SkPathCounter {
sk_sp<SkImage> ImageDeserializer_SkDeserialImageProc(const void*, size_t, void* imagedeserializer);
+bool SkPicture_StreamIsSKP(SkStream*, SkPictInfo*);
+
#endif // SkPictureCommon_DEFINED