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

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

Issue 1432503003: Comments Style: s/skbug.com/bug.skia.org/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: include Created 5 years, 1 month 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/SkImageGenerator.cpp ('k') | src/gpu/GrBufferAllocPool.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "SkRRect.h" 8 #include "SkRRect.h"
9 #include "SkMatrix.h" 9 #include "SkMatrix.h"
10 10
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 scale = compute_min_scale(fRadii[2].fX, fRadii[3].fX, fRect.width(), scale) ; 195 scale = compute_min_scale(fRadii[2].fX, fRadii[3].fX, fRect.width(), scale) ;
196 scale = compute_min_scale(fRadii[3].fY, fRadii[0].fY, fRect.height(), scale) ; 196 scale = compute_min_scale(fRadii[3].fY, fRadii[0].fY, fRect.height(), scale) ;
197 197
198 if (scale < 1.0) { 198 if (scale < 1.0) {
199 for (int i = 0; i < 4; ++i) { 199 for (int i = 0; i < 4; ++i) {
200 fRadii[i].fX *= scale; 200 fRadii[i].fX *= scale;
201 fRadii[i].fY *= scale; 201 fRadii[i].fY *= scale;
202 } 202 }
203 } 203 }
204 204
205 // skbug.com/3239 -- its possible that we can hit the following inconsistenc y: 205 // https://bug.skia.org/3239 -- its possible that we can hit the following i nconsistency:
206 // rad == bounds.bottom - bounds.top 206 // rad == bounds.bottom - bounds.top
207 // bounds.bottom - radius < bounds.top 207 // bounds.bottom - radius < bounds.top
208 // YIKES 208 // YIKES
209 // We need to detect and "fix" this now, otherwise we can have the following wackiness: 209 // We need to detect and "fix" this now, otherwise we can have the following wackiness:
210 // path.addRRect(rrect); 210 // path.addRRect(rrect);
211 // rrect.rect() != path.getBounds() 211 // rrect.rect() != path.getBounds()
212 for (int i = 0; i < 4; ++i) { 212 for (int i = 0; i < 4; ++i) {
213 fRadii[i].fX = clamp_radius_check_predicates(fRadii[i].fX, fRect.fLeft, fRect.fRight); 213 fRadii[i].fX = clamp_radius_check_predicates(fRadii[i].fX, fRect.fLeft, fRect.fRight);
214 fRadii[i].fY = clamp_radius_check_predicates(fRadii[i].fY, fRect.fTop, f Rect.fBottom); 214 fRadii[i].fY = clamp_radius_check_predicates(fRadii[i].fY, fRect.fTop, f Rect.fBottom);
215 } 215 }
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 } 592 }
593 593
594 for (int i = 0; i < 4; ++i) { 594 for (int i = 0; i < 4; ++i) {
595 validate_radius_check_predicates(fRadii[i].fX, fRect.fLeft, fRect.fRight ); 595 validate_radius_check_predicates(fRadii[i].fX, fRect.fLeft, fRect.fRight );
596 validate_radius_check_predicates(fRadii[i].fY, fRect.fTop, fRect.fBottom ); 596 validate_radius_check_predicates(fRadii[i].fY, fRect.fTop, fRect.fBottom );
597 } 597 }
598 } 598 }
599 #endif // SK_DEBUG 599 #endif // SK_DEBUG
600 600
601 /////////////////////////////////////////////////////////////////////////////// 601 ///////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « src/core/SkImageGenerator.cpp ('k') | src/gpu/GrBufferAllocPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698