fix android-only function

Bug: skia:
Change-Id: I4225bcc368fb5ac0898f4e34221e47cd50f93061
Reviewed-on: https://skia-review.googlesource.com/24407
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Mike Reed 2017-07-18 16:55:10 -04:00 committed by Skia Commit-Bot
parent f2290cb924
commit 1e0ca8598a
2 changed files with 5 additions and 9 deletions

View File

@ -110,14 +110,11 @@ protected:
// default impl does nothing.
virtual void onNotifyPixelsChanged();
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
// This is undefined if there are clients in-flight trying to use us
#ifdef SK_SUPPORT_LEGACY_COLORTABLE
void android_only_reset(int width, int height, size_t rowBytes, sk_sp<SkColorTable>);
#else
void android_only_reset(int width, int height, size_t rowBytes);
#endif
#endif
private:
int fWidth;

View File

@ -75,11 +75,12 @@ SkPixelRef::~SkPixelRef() {
this->callGenIDChangeListeners();
}
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
// This is undefined if there are clients in-flight trying to use us
void SkPixelRef::android_only_reset(int width, int height, size_t rowBytes,
sk_sp<SkColorTable> ctable) {
void SkPixelRef::android_only_reset(int width, int height, size_t rowBytes
#ifdef SK_SUPPORT_LEGACY_COLORTABLE
, sk_sp<SkColorTable> ctable
#endif
) {
fWidth = width;
fHeight = height;
fRowBytes = rowBytes;
@ -89,8 +90,6 @@ void SkPixelRef::android_only_reset(int width, int height, size_t rowBytes,
this->notifyPixelsChanged();
}
#endif
void SkPixelRef::needsNewGenID() {
fTaggedGenID.store(0);
SkASSERT(!this->genIDIsUnique()); // This method isn't threadsafe, so the assert should be fine.