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

Side by Side Diff: src/gpu/GrAAHairLinePathRenderer.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/gpu/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAllocator.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 * 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 "GrAAHairLinePathRenderer.h" 8 #include "GrAAHairLinePathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 *vert += kLineSegNumVertices; 615 *vert += kLineSegNumVertices;
616 } 616 }
617 617
618 /////////////////////////////////////////////////////////////////////////////// 618 ///////////////////////////////////////////////////////////////////////////////
619 619
620 bool GrAAHairLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { 620 bool GrAAHairLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
621 if (!args.fAntiAlias) { 621 if (!args.fAntiAlias) {
622 return false; 622 return false;
623 } 623 }
624 624
625 if (!IsStrokeHairlineOrEquivalent(*args.fStroke, *args.fViewMatrix, NULL)) { 625 if (!IsStrokeHairlineOrEquivalent(*args.fStroke, *args.fViewMatrix, nullptr) ) {
626 return false; 626 return false;
627 } 627 }
628 628
629 if (SkPath::kLine_SegmentMask == args.fPath->getSegmentMasks() || 629 if (SkPath::kLine_SegmentMask == args.fPath->getSegmentMasks() ||
630 args.fShaderCaps->shaderDerivativeSupport()) { 630 args.fShaderCaps->shaderDerivativeSupport()) {
631 return true; 631 return true;
632 } 632 }
633 return false; 633 return false;
634 } 634 }
635 635
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 // Setup the viewmatrix and localmatrix for the GrGeometryProcessor. 791 // Setup the viewmatrix and localmatrix for the GrGeometryProcessor.
792 SkMatrix invert; 792 SkMatrix invert;
793 if (!this->viewMatrix().invert(&invert)) { 793 if (!this->viewMatrix().invert(&invert)) {
794 return; 794 return;
795 } 795 }
796 796
797 // we will transform to identity space if the viewmatrix does not have persp ective 797 // we will transform to identity space if the viewmatrix does not have persp ective
798 bool hasPerspective = this->viewMatrix().hasPerspective(); 798 bool hasPerspective = this->viewMatrix().hasPerspective();
799 const SkMatrix* geometryProcessorViewM = &SkMatrix::I(); 799 const SkMatrix* geometryProcessorViewM = &SkMatrix::I();
800 const SkMatrix* geometryProcessorLocalM = &invert; 800 const SkMatrix* geometryProcessorLocalM = &invert;
801 const SkMatrix* toDevice = NULL; 801 const SkMatrix* toDevice = nullptr;
802 const SkMatrix* toSrc = NULL; 802 const SkMatrix* toSrc = nullptr;
803 if (hasPerspective) { 803 if (hasPerspective) {
804 geometryProcessorViewM = &this->viewMatrix(); 804 geometryProcessorViewM = &this->viewMatrix();
805 geometryProcessorLocalM = &SkMatrix::I(); 805 geometryProcessorLocalM = &SkMatrix::I();
806 toDevice = &this->viewMatrix(); 806 toDevice = &this->viewMatrix();
807 toSrc = &invert; 807 toSrc = &invert;
808 } 808 }
809 809
810 SkAutoTUnref<const GrGeometryProcessor> lineGP; 810 SkAutoTUnref<const GrGeometryProcessor> lineGP;
811 { 811 {
812 using namespace GrDefaultGeoProcFactory; 812 using namespace GrDefaultGeoProcFactory;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 GrColor color = GrRandomColor(random); 989 GrColor color = GrRandomColor(random);
990 SkMatrix viewMatrix = GrTest::TestMatrix(random); 990 SkMatrix viewMatrix = GrTest::TestMatrix(random);
991 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle); 991 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle);
992 SkPath path = GrTest::TestPath(random); 992 SkPath path = GrTest::TestPath(random);
993 SkIRect devClipBounds; 993 SkIRect devClipBounds;
994 devClipBounds.setEmpty(); 994 devClipBounds.setEmpty();
995 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds) ; 995 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds) ;
996 } 996 }
997 997
998 #endif 998 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698