From 7cd90d4eecdba0f40a36945749d40df95d6d641b Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 16 Oct 2012 18:42:58 -0700 Subject: Add Android specific API Bug #7353771 This API is just a boolean property that tells the hardware renderer whether it should use mipmap levels. Change-Id: I123a334b89b0d64d711bdad43f5e2feb416de8b4 --- include/core/SkBitmap.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h index 57b80e5..2d5fc41 100644 --- a/include/core/SkBitmap.h +++ b/include/core/SkBitmap.h @@ -513,6 +513,16 @@ public: */ int extractMipLevel(SkBitmap* dst, SkFixed sx, SkFixed sy); +#ifdef SK_BUILD_FOR_ANDROID + bool hasHardwareMipMap() const { + return fHasHardwareMipMap; + } + + void setHasHardwareMipMap(bool hasHardwareMipMap) { + fHasHardwareMipMap = hasHardwareMipMap; + } +#endif + bool extractAlpha(SkBitmap* dst) const { return this->extractAlpha(dst, NULL, NULL, NULL); } @@ -614,6 +624,10 @@ private: uint8_t fFlags; uint8_t fBytesPerPixel; // based on config +#ifdef SK_BUILD_FOR_ANDROID + bool fHasHardwareMipMap; +#endif + /* Internal computations for safe size. */ static Sk64 ComputeSafeSize64(Config config, -- cgit v1.1