Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: include/core/SkBitmap.h

Issue 12699002: Upstream changes from Android. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more fiex Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkPaint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 9347bd93d8e3f529b908cc3d035c3bbbf89a1823..124525e249ea9ca2be333168fd8598acb822015d 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -542,6 +542,20 @@ public:
*/
int extractMipLevel(SkBitmap* dst, SkFixed sx, SkFixed sy);
+#ifdef SK_BUILD_FOR_ANDROID
+ bool hasHardwareMipMap() const {
+ return (fFlags & kHasHardwareMipMap_Flag) != 0;
+ }
+
+ void setHasHardwareMipMap(bool hasHardwareMipMap) {
+ if (hasHardwareMipMap) {
+ fFlags |= kHasHardwareMipMap_Flag;
+ } else {
+ fFlags &= ~kHasHardwareMipMap_Flag;
+ }
+ }
+#endif
+
bool extractAlpha(SkBitmap* dst) const {
return this->extractAlpha(dst, NULL, NULL, NULL);
}
@@ -642,7 +656,14 @@ private:
enum Flags {
kImageIsOpaque_Flag = 0x01,
kImageIsVolatile_Flag = 0x02,
- kImageIsImmutable_Flag = 0x04
+ kImageIsImmutable_Flag = 0x04,
+#ifdef SK_BUILD_FOR_ANDROID
+ /* A hint for the renderer responsible for drawing this bitmap
+ * indicating that it should attempt to use mipmaps when this bitmap
+ * is drawn scaled down.
+ */
+ kHasHardwareMipMap_Flag = 0x08,
+#endif
};
uint32_t fRowBytes;
« no previous file with comments | « no previous file | include/core/SkPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698