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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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/SkDrawable.cpp ('k') | src/core/SkEmptyShader.h » ('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 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 "SkEdgeBuilder.h" 8 #include "SkEdgeBuilder.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkEdge.h" 10 #include "SkEdge.h"
11 #include "SkEdgeClipper.h" 11 #include "SkEdgeClipper.h"
12 #include "SkLineClipper.h" 12 #include "SkLineClipper.h"
13 #include "SkGeometry.h" 13 #include "SkGeometry.h"
14 14
15 template <typename T> static T* typedAllocThrow(SkChunkAlloc& alloc) { 15 template <typename T> static T* typedAllocThrow(SkChunkAlloc& alloc) {
16 return static_cast<T*>(alloc.allocThrow(sizeof(T))); 16 return static_cast<T*>(alloc.allocThrow(sizeof(T)));
17 } 17 }
18 18
19 /////////////////////////////////////////////////////////////////////////////// 19 ///////////////////////////////////////////////////////////////////////////////
20 20
21 SkEdgeBuilder::SkEdgeBuilder() : fAlloc(16*1024) { 21 SkEdgeBuilder::SkEdgeBuilder() : fAlloc(16*1024) {
22 fEdgeList = NULL; 22 fEdgeList = nullptr;
23 } 23 }
24 24
25 void SkEdgeBuilder::addLine(const SkPoint pts[]) { 25 void SkEdgeBuilder::addLine(const SkPoint pts[]) {
26 SkEdge* edge = typedAllocThrow<SkEdge>(fAlloc); 26 SkEdge* edge = typedAllocThrow<SkEdge>(fAlloc);
27 if (edge->setLine(pts[0], pts[1], fShiftUp)) { 27 if (edge->setLine(pts[0], pts[1], fShiftUp)) {
28 fList.push(edge); 28 fList.push(edge);
29 } else { 29 } else {
30 // TODO: unallocate edge from storage... 30 // TODO: unallocate edge from storage...
31 } 31 }
32 } 32 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 256 }
257 default: 257 default:
258 SkDEBUGFAIL("unexpected verb"); 258 SkDEBUGFAIL("unexpected verb");
259 break; 259 break;
260 } 260 }
261 } 261 }
262 } 262 }
263 fEdgeList = fList.begin(); 263 fEdgeList = fList.begin();
264 return fList.count(); 264 return fList.count();
265 } 265 }
OLDNEW
« no previous file with comments | « src/core/SkDrawable.cpp ('k') | src/core/SkEmptyShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698