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

Side by Side Diff: tests/ScaleToSidesTest.cpp

Issue 1618283004: Change name from ScaleToSides to SkScaleToSides. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/core/SkScaleToSides.h ('k') | 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 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkScaleToSides.h" 8 #include "SkScaleToSides.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 30 matching lines...) Expand all
41 for (int k = 0; k < numInterestingValues; k++) { 41 for (int k = 0; k < numInterestingValues; k++) {
42 float radius1 = (float)interestingValues[i]; 42 float radius1 = (float)interestingValues[i];
43 float radius2 = (float)interestingValues[j]; 43 float radius2 = (float)interestingValues[j];
44 double width = interestingValues[k]; 44 double width = interestingValues[k];
45 double scale = width / ((double)radius1 + (double)radius2); 45 double scale = width / ((double)radius1 + (double)radius2);
46 if (width > 0.0) { 46 if (width > 0.0) {
47 if (s != 0) { 47 if (s != 0) {
48 scale = std::min(scale, interestingValues[s-1]); 48 scale = std::min(scale, interestingValues[s-1]);
49 } 49 }
50 if (scale < 1.0 && scale > 0.0) { 50 if (scale < 1.0 && scale > 0.0) {
51 ScaleToSides::AdjustRadii(width, scale, &radius1, &r adius2); 51 SkScaleToSides::AdjustRadii(width, scale, &radius1, &radius2);
52 } 52 }
53 } 53 }
54 } 54 }
55 } 55 }
56 } 56 }
57 } 57 }
58 } 58 }
OLDNEW
« no previous file with comments | « src/core/SkScaleToSides.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698