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

Side by Side Diff: src/gpu/effects/GrOvalEffect.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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrOvalEffect.h" 8 #include "GrOvalEffect.h"
9 9
10 #include "GrFragmentProcessor.h" 10 #include "GrFragmentProcessor.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 } 353 }
354 354
355 GrGLFragmentProcessor* EllipseEffect::onCreateGLInstance() const { 355 GrGLFragmentProcessor* EllipseEffect::onCreateGLInstance() const {
356 return new GLEllipseEffect(*this); 356 return new GLEllipseEffect(*this);
357 } 357 }
358 358
359 ////////////////////////////////////////////////////////////////////////////// 359 //////////////////////////////////////////////////////////////////////////////
360 360
361 GrFragmentProcessor* GrOvalEffect::Create(GrPrimitiveEdgeType edgeType, const Sk Rect& oval) { 361 GrFragmentProcessor* GrOvalEffect::Create(GrPrimitiveEdgeType edgeType, const Sk Rect& oval) {
362 if (kHairlineAA_GrProcessorEdgeType == edgeType) { 362 if (kHairlineAA_GrProcessorEdgeType == edgeType) {
363 return NULL; 363 return nullptr;
364 } 364 }
365 SkScalar w = oval.width(); 365 SkScalar w = oval.width();
366 SkScalar h = oval.height(); 366 SkScalar h = oval.height();
367 if (SkScalarNearlyEqual(w, h)) { 367 if (SkScalarNearlyEqual(w, h)) {
368 w /= 2; 368 w /= 2;
369 return CircleEffect::Create(edgeType, SkPoint::Make(oval.fLeft + w, oval .fTop + w), w); 369 return CircleEffect::Create(edgeType, SkPoint::Make(oval.fLeft + w, oval .fTop + w), w);
370 } else { 370 } else {
371 w /= 2; 371 w /= 2;
372 h /= 2; 372 h /= 2;
373 return EllipseEffect::Create(edgeType, SkPoint::Make(oval.fLeft + w, ova l.fTop + h), w, h); 373 return EllipseEffect::Create(edgeType, SkPoint::Make(oval.fLeft + w, ova l.fTop + h), w, h);
374 } 374 }
375 375
376 return NULL; 376 return nullptr;
377 } 377 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDistanceFieldGeoProc.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698