From b3d2760e2ff9959d8f129c83862fa9260a52df16 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Thu, 15 Nov 2018 14:17:01 -0500 Subject: [PATCH] Add safety net logging for issue 118143775 Bug: b/118143775 Change-Id: I79d932a83753cb01d34afe15b91fda860ca35749 Reviewed-on: https://skia-review.googlesource.com/c/171227 Auto-Submit: Leon Scroggins Reviewed-by: Derek Sollenberger Commit-Queue: Leon Scroggins --- src/codec/SkSwizzler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp index 1d52cfd5aa..8e9fec301b 100644 --- a/src/codec/SkSwizzler.cpp +++ b/src/codec/SkSwizzler.cpp @@ -12,6 +12,10 @@ #include "SkSwizzler.h" #include "SkTemplates.h" +#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK + #include "SkAndroidFrameworkUtils.h" +#endif + static void copy(void* dst, const uint8_t* src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[]) { // This function must not be called if we are sampling. If we are not @@ -1206,6 +1210,9 @@ int SkSwizzler::onSetSampleX(int sampleX) { const size_t dstSwizzleBytes = fSwizzleWidth * fDstBPP; const size_t dstAllocatedBytes = fAllocatedWidth * fDstBPP; if (fDstOffsetBytes + dstSwizzleBytes > dstAllocatedBytes) { +#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK + SkAndroidFrameworkUtils::SafetyNetLog("118143775"); +#endif SkASSERT(dstSwizzleBytes < dstAllocatedBytes); fDstOffsetBytes = dstAllocatedBytes - dstSwizzleBytes; }