aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState.cpp
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-27 21:12:42 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-27 21:12:42 +0000
commitf3b1eb4ea262e48c93db8f0975e16341596cd8ec (patch)
tree52cae295117d4a63017a1d7d6de7acdf15cc45ec /src/core/SkBitmapProcState.cpp
parent3089004cc88e919526e43a8122a74db8f0a7790b (diff)
git-svn-id: http://skia.googlecode.com/svn/trunk@14907 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBitmapProcState.cpp')
-rw-r--r--src/core/SkBitmapProcState.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index 220eb56316..eecfbbcc48 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -15,7 +15,6 @@
#include "SkMipMap.h"
#include "SkPixelRef.h"
#include "SkScaledImageCache.h"
-#include "SkImageEncoder.h"
#if !SK_ARM_NEON_IS_NONE
// These are defined in src/opts/SkBitmapProcState_arm_neon.cpp
@@ -167,13 +166,8 @@ bool SkBitmapProcState::possiblyScaleImage() {
}
if (NULL == fScaledCacheID) {
- float dest_width = fOrigBitmap.width() / invScaleX;
- float dest_height = fOrigBitmap.height() / invScaleY;
-
-#ifdef SK_IGNORE_CORRECT_HIGH_QUALITY_IMAGE_SCALE
- dest_width = SkScalarCeilToScalar(dest_width);
- dest_height = SkScalarCeilToScalar(dest_height);
-#endif
+ int dest_width = SkScalarCeilToInt(fOrigBitmap.width() / invScaleX);
+ int dest_height = SkScalarCeilToInt(fOrigBitmap.height() / invScaleY);
// All the criteria are met; let's make a new bitmap.
@@ -193,7 +187,6 @@ bool SkBitmapProcState::possiblyScaleImage() {
return false;
}
-
SkASSERT(NULL != fScaledBitmap.getPixels());
fScaledCacheID = SkScaledImageCache::AddAndLock(fOrigBitmap,
invScaleX,