Loading libs/hwui/hwui/Bitmap.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -582,20 +582,22 @@ size_t Bitmap::mTotalBitmapBytes = 0; size_t Bitmap::mTotalBitmapCount = 0; void Bitmap::traceBitmapCreate() { if (ATRACE_ENABLED()) { size_t bytes = getAllocationByteCount(); std::lock_guard lock{mLock}; mTotalBitmapBytes += getAllocationByteCount(); mTotalBitmapBytes += bytes; mTotalBitmapCount++; if (ATRACE_ENABLED()) { ATRACE_INT64("Bitmap Memory", mTotalBitmapBytes); ATRACE_INT64("Bitmap Count", mTotalBitmapCount); } } void Bitmap::traceBitmapDelete() { if (ATRACE_ENABLED()) { size_t bytes = getAllocationByteCount(); std::lock_guard lock{mLock}; mTotalBitmapBytes -= getAllocationByteCount(); mTotalBitmapCount--; if (ATRACE_ENABLED()) { ATRACE_INT64("Bitmap Memory", mTotalBitmapBytes); ATRACE_INT64("Bitmap Count", mTotalBitmapCount); } Loading Loading
libs/hwui/hwui/Bitmap.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -582,20 +582,22 @@ size_t Bitmap::mTotalBitmapBytes = 0; size_t Bitmap::mTotalBitmapCount = 0; void Bitmap::traceBitmapCreate() { if (ATRACE_ENABLED()) { size_t bytes = getAllocationByteCount(); std::lock_guard lock{mLock}; mTotalBitmapBytes += getAllocationByteCount(); mTotalBitmapBytes += bytes; mTotalBitmapCount++; if (ATRACE_ENABLED()) { ATRACE_INT64("Bitmap Memory", mTotalBitmapBytes); ATRACE_INT64("Bitmap Count", mTotalBitmapCount); } } void Bitmap::traceBitmapDelete() { if (ATRACE_ENABLED()) { size_t bytes = getAllocationByteCount(); std::lock_guard lock{mLock}; mTotalBitmapBytes -= getAllocationByteCount(); mTotalBitmapCount--; if (ATRACE_ENABLED()) { ATRACE_INT64("Bitmap Memory", mTotalBitmapBytes); ATRACE_INT64("Bitmap Count", mTotalBitmapCount); } Loading