From 63df65dfe2632f0b2e5d53bea36df9aece96ed12 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Mon, 10 Apr 2017 13:31:28 -0400 Subject: [PATCH] mark mPixelStorageType const This is a natural consequence of the fact that we always call setPreLocked from the constructor. Future Skia will remove the virtual for lockPixels (onNewLockPixels), but that is compatible with this subclass since does not change its pixel-addr or pixel-type after the constructor. See skbug.com/6481 for more details Test: existing tests apply, no behavior change Change-Id: I0f9d3efc9a05b71907480eaaadbc7fafe9dd491b --- libs/hwui/hwui/Bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hwui/hwui/Bitmap.h b/libs/hwui/hwui/Bitmap.h index da45f7697f56f..3ade3fe95cc31 100644 --- a/libs/hwui/hwui/Bitmap.h +++ b/libs/hwui/hwui/Bitmap.h @@ -120,7 +120,7 @@ private: virtual ~Bitmap(); void* getStorage() const; - PixelStorageType mPixelStorageType; + const PixelStorageType mPixelStorageType; size_t mRowBytes = 0; sk_sp mColorTable;