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

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

Issue 23875010: simplify making translate only invmatrix (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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