X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2Fskia%2Fsrc%2Fcore%2FSkBitmapProcState.cpp;h=c3801e4404cbfae38c7b9022906c83a283ef2071;hb=f5180d0a4dfe13ef74567dc9aa75047c1a9cd6de;hp=6c1dc30449a81ed0a1ddd7686a2cd5eaab5b1a31;hpb=669bbc0a54393464248e6bac22558cda42a9a350;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/skia/src/core/SkBitmapProcState.cpp b/src/third_party/skia/src/core/SkBitmapProcState.cpp index 6c1dc30..c3801e4 100644 --- a/src/third_party/skia/src/core/SkBitmapProcState.cpp +++ b/src/third_party/skia/src/core/SkBitmapProcState.cpp @@ -252,36 +252,9 @@ bool SkBitmapProcState::possiblyScaleImage() { SkASSERT(SkPaint::kMedium_FilterLevel == fFilterLevel); - /** - * Medium quality means use a mipmap for down-scaling, and just bilper - * for upscaling. Since we're examining the inverse matrix, we look for - * a scale > 1 to indicate down scaling by the CTM. - */ - if (scaleSqd > SK_Scalar1) { - fCurrMip.reset(SkMipMapCache::FindAndRef(fOrigBitmap)); - if (NULL == fCurrMip.get()) { - fCurrMip.reset(SkMipMap::Build(fOrigBitmap)); - if (NULL == fCurrMip.get()) { - return false; - } - SkMipMapCache::Add(fOrigBitmap, fCurrMip); - } - - SkScalar levelScale = SkScalarInvert(SkScalarSqrt(scaleSqd)); - SkMipMap::Level level; - if (fCurrMip->extractLevel(levelScale, &level)) { - SkScalar invScaleFixup = level.fScale; - fInvMatrix.postScale(invScaleFixup, invScaleFixup); - - const SkImageInfo info = fOrigBitmap.info().makeWH(level.fWidth, level.fHeight); - // todo: if we could wrap the fCurrMip in a pixelref, then we could just install - // that here, and not need to explicitly track it ourselves. - fScaledBitmap.installPixels(info, level.fPixels, level.fRowBytes); - fBitmap = &fScaledBitmap; - fFilterLevel = SkPaint::kLow_FilterLevel; - return true; - } - } + // HACK: Disable use of mipmaps in M39 since they do not use discardable + // memory in the cache. + fFilterLevel = SkPaint::kLow_FilterLevel; return false; }