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

Side by Side Diff: samplecode/SampleTextureDomain.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 | « samplecode/SampleTextOnPath.cpp ('k') | samplecode/SampleTiling.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 2011 Google Inc. 2 * Copyright 2011 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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 srcRect.setXYWH(1, 1, 3, 3); 78 srcRect.setXYWH(1, 1, 3, 3);
79 dstRect.setXYWH(5, 405, 305, 305); 79 dstRect.setXYWH(5, 405, 305, 305);
80 SkMaskFilter* mf = SkBlurMaskFilter::Create( 80 SkMaskFilter* mf = SkBlurMaskFilter::Create(
81 kNormal_SkBlurStyle, 81 kNormal_SkBlurStyle,
82 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)), 82 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)),
83 SkBlurMaskFilter::kHighQuality_BlurFlag | 83 SkBlurMaskFilter::kHighQuality_BlurFlag |
84 SkBlurMaskFilter::kIgnoreTransform_BlurFlag); 84 SkBlurMaskFilter::kIgnoreTransform_BlurFlag);
85 paint.setMaskFilter(mf)->unref(); 85 paint.setMaskFilter(mf)->unref();
86 canvas->drawImageRect(image, srcRect, dstRect, &paint); 86 canvas->drawImageRect(image, srcRect, dstRect, &paint);
87 87
88 // Blur and a rotation + NULL src rect 88 // Blur and a rotation + nullptr src rect
89 // This should not trigger the texture domain code 89 // This should not trigger the texture domain code
90 // but it will test a code path in SkGpuDevice::drawBitmap 90 // but it will test a code path in SkGpuDevice::drawBitmap
91 // that handles blurs with rects transformed to non- 91 // that handles blurs with rects transformed to non-
92 // orthogonal rects. It also tests the NULL src rect handling 92 // orthogonal rects. It also tests the nullptr src rect handling
93 mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 93 mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
94 SkBlurMask::ConvertRadiusToSigma(5), 94 SkBlurMask::ConvertRadiusToSigma(5),
95 SkBlurMaskFilter::kHighQuality_BlurFlag); 95 SkBlurMaskFilter::kHighQuality_BlurFlag);
96 paint.setMaskFilter(mf)->unref(); 96 paint.setMaskFilter(mf)->unref();
97 97
98 dstRect.setXYWH(-150, -150, 300, 300); 98 dstRect.setXYWH(-150, -150, 300, 300);
99 canvas->translate(550, 550); 99 canvas->translate(550, 550);
100 canvas->rotate(45); 100 canvas->rotate(45);
101 canvas->drawBitmapRect(fBM, dstRect, &paint); 101 canvas->drawBitmapRect(fBM, dstRect, &paint);
102 } 102 }
103 private: 103 private:
104 typedef SkView INHERITED; 104 typedef SkView INHERITED;
105 }; 105 };
106 106
107 ////////////////////////////////////////////////////////////////////////////// 107 //////////////////////////////////////////////////////////////////////////////
108 108
109 static SkView* MyFactory() { return new TextureDomainView; } 109 static SkView* MyFactory() { return new TextureDomainView; }
110 static SkViewRegister reg(MyFactory); 110 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleTextOnPath.cpp ('k') | samplecode/SampleTiling.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698