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

Side by Side Diff: src/core/SkBlitter_Sprite.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/SkBlitter_RGB16.cpp ('k') | src/core/SkBuffer.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkSmallAllocator.h" 8 #include "SkSmallAllocator.h"
9 #include "SkSpriteBlitter.h" 9 #include "SkSpriteBlitter.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const SkPixmap& source, int left, int top, SkTBlitterAllocator* allocato r) { 44 const SkPixmap& source, int left, int top, SkTBlitterAllocator* allocato r) {
45 /* We currently ignore antialiasing and filtertype, meaning we will take ou r 45 /* We currently ignore antialiasing and filtertype, meaning we will take ou r
46 special blitters regardless of these settings. Ignoring filtertype seems fine 46 special blitters regardless of these settings. Ignoring filtertype seems fine
47 since by definition there is no scale in the matrix. Ignoring antialiasi ng is 47 since by definition there is no scale in the matrix. Ignoring antialiasi ng is
48 a bit of a hack, since we "could" pass in the fractional left/top for th e bitmap, 48 a bit of a hack, since we "could" pass in the fractional left/top for th e bitmap,
49 and respect that by blending the edges of the bitmap against the device. To support 49 and respect that by blending the edges of the bitmap against the device. To support
50 this we could either add more special blitters here, or detect antialias ing in the 50 this we could either add more special blitters here, or detect antialias ing in the
51 paint and return null if it is set, forcing the client to take the slow shader case 51 paint and return null if it is set, forcing the client to take the slow shader case
52 (which does respect soft edges). 52 (which does respect soft edges).
53 */ 53 */
54 SkASSERT(allocator != NULL); 54 SkASSERT(allocator != nullptr);
55 55
56 SkSpriteBlitter* blitter; 56 SkSpriteBlitter* blitter;
57 57
58 switch (dst.colorType()) { 58 switch (dst.colorType()) {
59 case kRGB_565_SkColorType: 59 case kRGB_565_SkColorType:
60 blitter = SkSpriteBlitter::ChooseD16(source, paint, allocator); 60 blitter = SkSpriteBlitter::ChooseD16(source, paint, allocator);
61 break; 61 break;
62 case kN32_SkColorType: 62 case kN32_SkColorType:
63 blitter = SkSpriteBlitter::ChooseD32(source, paint, allocator); 63 blitter = SkSpriteBlitter::ChooseD32(source, paint, allocator);
64 break; 64 break;
65 default: 65 default:
66 blitter = NULL; 66 blitter = nullptr;
67 break; 67 break;
68 } 68 }
69 69
70 if (blitter) { 70 if (blitter) {
71 blitter->setup(dst, left, top, paint); 71 blitter->setup(dst, left, top, paint);
72 } 72 }
73 return blitter; 73 return blitter;
74 } 74 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter_RGB16.cpp ('k') | src/core/SkBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698