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

Side by Side Diff: src/gpu/GrPathProcessor.cpp

Issue 1682083002: Remove SkNEW_APPEND_TO_TARRAY. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « include/core/SkTArray.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.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 2013 Google Inc. 2 * Copyright 2013 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 "GrPathProcessor.h" 8 #include "GrPathProcessor.h"
9 9
10 #include "gl/GrGLGpu.h" 10 #include "gl/GrGLGpu.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 SkString strVaryingName("MatrixCoord"); 66 SkString strVaryingName("MatrixCoord");
67 strVaryingName.appendf("_%i_%i", i, t); 67 strVaryingName.appendf("_%i_%i", i, t);
68 GrGLSLVertToFrag v(varyingType); 68 GrGLSLVertToFrag v(varyingType);
69 GrGLVaryingHandler* glVaryingHandler = (GrGLVaryingHandler*) var yingHandler; 69 GrGLVaryingHandler* glVaryingHandler = (GrGLVaryingHandler*) var yingHandler;
70 fInstalledTransforms[i][t].fHandle = 70 fInstalledTransforms[i][t].fHandle =
71 glVaryingHandler->addPathProcessingVarying(strVaryingNam e.c_str(), 71 glVaryingHandler->addPathProcessingVarying(strVaryingNam e.c_str(),
72 &v).toIndex() ; 72 &v).toIndex() ;
73 fInstalledTransforms[i][t].fType = varyingType; 73 fInstalledTransforms[i][t].fType = varyingType;
74 74
75 SkNEW_APPEND_TO_TARRAY(&(*tout)[i], GrGLSLTransformedCoords, 75 (*tout)[i].emplace_back(SkString(v.fsIn()), varyingType);
76 (SkString(v.fsIn()), varyingType));
77 } 76 }
78 } 77 }
79 } 78 }
80 79
81 void setData(const GrGLSLProgramDataManager& pd, 80 void setData(const GrGLSLProgramDataManager& pd,
82 const GrPrimitiveProcessor& primProc) override { 81 const GrPrimitiveProcessor& primProc) override {
83 const GrPathProcessor& pathProc = primProc.cast<GrPathProcessor>(); 82 const GrPathProcessor& pathProc = primProc.cast<GrPathProcessor>();
84 if (pathProc.overrides().readsColor() && pathProc.color() != fColor) { 83 if (pathProc.overrides().readsColor() && pathProc.color() != fColor) {
85 float c[4]; 84 float c[4];
86 GrColorToRGBAFloat(pathProc.color(), c); 85 GrColorToRGBAFloat(pathProc.color(), c);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 131
133 void GrPathProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps, 132 void GrPathProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps,
134 GrProcessorKeyBuilder* b) const { 133 GrProcessorKeyBuilder* b) const {
135 GrGLPathProcessor::GenKey(*this, caps, b); 134 GrGLPathProcessor::GenKey(*this, caps, b);
136 } 135 }
137 136
138 GrGLSLPrimitiveProcessor* GrPathProcessor::createGLSLInstance(const GrGLSLCaps& caps) const { 137 GrGLSLPrimitiveProcessor* GrPathProcessor::createGLSLInstance(const GrGLSLCaps& caps) const {
139 SkASSERT(caps.pathRenderingSupport()); 138 SkASSERT(caps.pathRenderingSupport());
140 return new GrGLPathProcessor(); 139 return new GrGLPathProcessor();
141 } 140 }
OLDNEW
« no previous file with comments | « include/core/SkTArray.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698