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

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

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkFlattenable.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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 #include "SkEdge.h" 10 #include "SkEdge.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 int top = SkFDot6Round(y0); 61 int top = SkFDot6Round(y0);
62 int bot = SkFDot6Round(y1); 62 int bot = SkFDot6Round(y1);
63 63
64 // are we a zero-height line? 64 // are we a zero-height line?
65 if (top == bot) { 65 if (top == bot) {
66 return 0; 66 return 0;
67 } 67 }
68 // are we completely above or below the clip? 68 // are we completely above or below the clip?
69 if (NULL != clip && (top >= clip->fBottom || bot <= clip->fTop)) { 69 if (clip && (top >= clip->fBottom || bot <= clip->fTop)) {
70 return 0; 70 return 0;
71 } 71 }
72 72
73 SkFixed slope = SkFDot6Div(x1 - x0, y1 - y0); 73 SkFixed slope = SkFDot6Div(x1 - x0, y1 - y0);
74 const int dy = SkEdge_Compute_DY(top, y0); 74 const int dy = SkEdge_Compute_DY(top, y0);
75 75
76 fX = SkFDot6ToFixed(x0 + SkFixedMul(slope, dy)); // + SK_Fixed1/2 76 fX = SkFDot6ToFixed(x0 + SkFixedMul(slope, dy)); // + SK_Fixed1/2
77 fDX = slope; 77 fDX = slope;
78 fFirstY = top; 78 fFirstY = top;
79 fLastY = bot - 1; 79 fLastY = bot - 1;
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 success = this->updateLine(oldx, oldy, newx, newy); 485 success = this->updateLine(oldx, oldy, newx, newy);
486 oldx = newx; 486 oldx = newx;
487 oldy = newy; 487 oldy = newy;
488 } while (count < 0 && !success); 488 } while (count < 0 && !success);
489 489
490 fCx = newx; 490 fCx = newx;
491 fCy = newy; 491 fCy = newy;
492 fCurveCount = SkToS8(count); 492 fCurveCount = SkToS8(count);
493 return success; 493 return success;
494 } 494 }
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkFlattenable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698