OLD | NEW |
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 invScaleX, | 172 invScaleX, |
173 invScaleY, | 173 invScaleY, |
174 fScaledBitmap); | 174 fScaledBitmap); |
175 } | 175 } |
176 fScaledBitmap.lockPixels(); | 176 fScaledBitmap.lockPixels(); |
177 | 177 |
178 fBitmap = &fScaledBitmap; | 178 fBitmap = &fScaledBitmap; |
179 | 179 |
180 // set the inv matrix type to translate-only; | 180 // set the inv matrix type to translate-only; |
181 | 181 |
182 fInvMatrix.setTranslate( 1/fInvMatrix.getScaleX() * fInvMatrix.getTransl
ateX(), | 182 fInvMatrix.setTranslate(fInvMatrix.getTranslateX() / fInvMatrix.getScale
X(), |
183 1/fInvMatrix.getScaleY() * fInvMatrix.getTransl
ateY() ); | 183 fInvMatrix.getTranslateY() / fInvMatrix.getScale
Y()); |
184 | 184 |
185 // no need for any further filtering; we just did it! | 185 // no need for any further filtering; we just did it! |
186 | 186 |
187 fFilterLevel = SkPaint::kNone_FilterLevel; | 187 fFilterLevel = SkPaint::kNone_FilterLevel; |
188 | 188 |
189 return; | 189 return; |
190 } | 190 } |
191 | 191 |
192 /* | 192 /* |
193 * If we get here, the caller has requested either Med or High filter-level | 193 * If we get here, the caller has requested either Med or High filter-level |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 } else { | 948 } else { |
949 size >>= 2; | 949 size >>= 2; |
950 } | 950 } |
951 | 951 |
952 if (fFilterLevel != SkPaint::kNone_FilterLevel) { | 952 if (fFilterLevel != SkPaint::kNone_FilterLevel) { |
953 size >>= 1; | 953 size >>= 1; |
954 } | 954 } |
955 | 955 |
956 return size; | 956 return size; |
957 } | 957 } |
OLD | NEW |