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

Side by Side Diff: src/core/SkBitmapProcState.cpp

Issue 323093002: Remove SK_IGNORE_CORRECT_HIGH_QUALITY_IMAGE_SCALE (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkBitmapProcState.h" 8 #include "SkBitmapProcState.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkFilterProc.h" 10 #include "SkFilterProc.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 SkScaledImageCache::Unlock(fScaledCacheID); 163 SkScaledImageCache::Unlock(fScaledCacheID);
164 fScaledCacheID = NULL; 164 fScaledCacheID = NULL;
165 // fall through to rebuild 165 // fall through to rebuild
166 } 166 }
167 } 167 }
168 168
169 if (NULL == fScaledCacheID) { 169 if (NULL == fScaledCacheID) {
170 float dest_width = fOrigBitmap.width() / invScaleX; 170 float dest_width = fOrigBitmap.width() / invScaleX;
171 float dest_height = fOrigBitmap.height() / invScaleY; 171 float dest_height = fOrigBitmap.height() / invScaleY;
172 172
173 #ifdef SK_IGNORE_CORRECT_HIGH_QUALITY_IMAGE_SCALE
174 dest_width = SkScalarCeilToScalar(dest_width);
175 dest_height = SkScalarCeilToScalar(dest_height);
176 #endif
177
178 // All the criteria are met; let's make a new bitmap. 173 // All the criteria are met; let's make a new bitmap.
179 174
180 SkConvolutionProcs simd; 175 SkConvolutionProcs simd;
181 sk_bzero(&simd, sizeof(simd)); 176 sk_bzero(&simd, sizeof(simd));
182 this->platformConvolutionProcs(&simd); 177 this->platformConvolutionProcs(&simd);
183 178
184 if (!SkBitmapScaler::Resize(&fScaledBitmap, 179 if (!SkBitmapScaler::Resize(&fScaledBitmap,
185 fOrigBitmap, 180 fOrigBitmap,
186 SkBitmapScaler::RESIZE_BEST, 181 SkBitmapScaler::RESIZE_BEST,
187 dest_width, 182 dest_width,
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 } else { 1034 } else {
1040 size >>= 2; 1035 size >>= 2;
1041 } 1036 }
1042 1037
1043 if (fFilterLevel != SkPaint::kNone_FilterLevel) { 1038 if (fFilterLevel != SkPaint::kNone_FilterLevel) {
1044 size >>= 1; 1039 size >>= 1;
1045 } 1040 }
1046 1041
1047 return size; 1042 return size;
1048 } 1043 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698