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

Side by Side Diff: src/views/SkTouchGesture.cpp

Issue 373383003: ios fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: only build gyp on ios Created 6 years, 5 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 | « src/utils/ios/SkImageDecoder_iOS.mm ('k') | tests/JpegTest.cpp » ('j') | 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 2010 Google Inc. 3 * Copyright 2010 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 8
9 9
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 scale = MAX_ZOOM_SCALE / curr; 196 scale = MAX_ZOOM_SCALE / curr;
197 } else if (scale < 1 && curr * scale < MIN_ZOOM_SCALE) { 197 } else if (scale < 1 && curr * scale < MIN_ZOOM_SCALE) {
198 scale = MIN_ZOOM_SCALE / curr; 198 scale = MIN_ZOOM_SCALE / curr;
199 } 199 }
200 return scale; 200 return scale;
201 } 201 }
202 202
203 void SkTouchGesture::touchMoved(void* owner, float x, float y) { 203 void SkTouchGesture::touchMoved(void* owner, float x, float y) {
204 // GrPrintf("--- %d touchMoved %p %g %g\n", fTouches.count(), owner, x, y); 204 // GrPrintf("--- %d touchMoved %p %g %g\n", fTouches.count(), owner, x, y);
205 205
206 SkASSERT(kEmpty_State != fState); 206 if (kEmpty_State == fState) {
207 return;
208 }
207 209
208 int index = this->findRec(owner); 210 int index = this->findRec(owner);
209 if (index < 0) { 211 if (index < 0) {
210 // not found, so I guess we should add it... 212 // not found, so I guess we should add it...
211 SkDebugf("---- add missing begin\n"); 213 SkDebugf("---- add missing begin\n");
212 this->appendNewRec(owner, x, y); 214 this->appendNewRec(owner, x, y);
213 index = fTouches.count() - 1; 215 index = fTouches.count() - 1;
214 } 216 }
215 217
216 Rec& rec = fTouches[index]; 218 Rec& rec = fTouches[index];
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 fTouches.reset(); 320 fTouches.reset();
319 fState = kEmpty_State; 321 fState = kEmpty_State;
320 found = true; 322 found = true;
321 } 323 }
322 } 324 }
323 325
324 fLastUpT = now; 326 fLastUpT = now;
325 fLastUpP.set(x, y); 327 fLastUpP.set(x, y);
326 return found; 328 return found;
327 } 329 }
OLDNEW
« no previous file with comments | « src/utils/ios/SkImageDecoder_iOS.mm ('k') | tests/JpegTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698