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

Side by Side Diff: src/core/SkRasterizer.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/SkRasterClip.cpp ('k') | src/core/SkReadBuffer.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 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 "SkRasterizer.h" 10 #include "SkRasterizer.h"
11 #include "SkDraw.h" 11 #include "SkDraw.h"
12 #include "SkMaskFilter.h" 12 #include "SkMaskFilter.h"
13 #include "SkPath.h" 13 #include "SkPath.h"
14 14
15 bool SkRasterizer::rasterize(const SkPath& fillPath, const SkMatrix& matrix, 15 bool SkRasterizer::rasterize(const SkPath& fillPath, const SkMatrix& matrix,
16 const SkIRect* clipBounds, SkMaskFilter* filter, 16 const SkIRect* clipBounds, SkMaskFilter* filter,
17 SkMask* mask, SkMask::CreateMode mode) const { 17 SkMask* mask, SkMask::CreateMode mode) const {
18 SkIRect storage; 18 SkIRect storage;
19 19
20 if (clipBounds && filter && SkMask::kJustRenderImage_CreateMode != mode) { 20 if (clipBounds && filter && SkMask::kJustRenderImage_CreateMode != mode) {
21 SkIPoint margin; 21 SkIPoint margin;
22 SkMask srcM, dstM; 22 SkMask srcM, dstM;
23 23
24 srcM.fFormat = SkMask::kA8_Format; 24 srcM.fFormat = SkMask::kA8_Format;
25 srcM.fBounds.set(0, 0, 1, 1); 25 srcM.fBounds.set(0, 0, 1, 1);
26 srcM.fImage = NULL; 26 srcM.fImage = nullptr;
27 if (!filter->filterMask(&dstM, srcM, matrix, &margin)) { 27 if (!filter->filterMask(&dstM, srcM, matrix, &margin)) {
28 return false; 28 return false;
29 } 29 }
30 storage = clipBounds->makeOutset(margin.fX, margin.fY); 30 storage = clipBounds->makeOutset(margin.fX, margin.fY);
31 clipBounds = &storage; 31 clipBounds = &storage;
32 } 32 }
33 33
34 return this->onRasterize(fillPath, matrix, clipBounds, mask, mode); 34 return this->onRasterize(fillPath, matrix, clipBounds, mask, mode);
35 } 35 }
36 36
37 /* Our default implementation of the virtual method just scan converts 37 /* Our default implementation of the virtual method just scan converts
38 */ 38 */
39 bool SkRasterizer::onRasterize(const SkPath& fillPath, const SkMatrix& matrix, 39 bool SkRasterizer::onRasterize(const SkPath& fillPath, const SkMatrix& matrix,
40 const SkIRect* clipBounds, 40 const SkIRect* clipBounds,
41 SkMask* mask, SkMask::CreateMode mode) const { 41 SkMask* mask, SkMask::CreateMode mode) const {
42 SkPath devPath; 42 SkPath devPath;
43 43
44 fillPath.transform(matrix, &devPath); 44 fillPath.transform(matrix, &devPath);
45 return SkDraw::DrawToMask(devPath, clipBounds, NULL, NULL, mask, mode, 45 return SkDraw::DrawToMask(devPath, clipBounds, nullptr, nullptr, mask, mode,
46 SkPaint::kFill_Style); 46 SkPaint::kFill_Style);
47 } 47 }
OLDNEW
« no previous file with comments | « src/core/SkRasterClip.cpp ('k') | src/core/SkReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698