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

Side by Side Diff: src/gpu/effects/GrYUVtoRGBEffect.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/effects/GrTextureStripAtlas.cpp ('k') | src/gpu/gl/GrGLAssembleInterface.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 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 "GrYUVtoRGBEffect.h" 8 #include "GrYUVtoRGBEffect.h"
9 9
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 static const GrGLfloat kRec709ConversionMatrix[16]; 57 static const GrGLfloat kRec709ConversionMatrix[16];
58 58
59 // this class always generates the same code. 59 // this class always generates the same code.
60 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKey Builder*) {} 60 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKey Builder*) {}
61 61
62 GLProcessor(const GrProcessor&) {} 62 GLProcessor(const GrProcessor&) {}
63 63
64 virtual void emitCode(EmitArgs& args) override { 64 virtual void emitCode(EmitArgs& args) override {
65 GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBui lder(); 65 GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBui lder();
66 66
67 const char* yuvMatrix = NULL; 67 const char* yuvMatrix = nullptr;
68 fMatrixUni = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment _Visibility, 68 fMatrixUni = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment _Visibility,
69 kMat44f_GrSLType, kDefault_GrSLPrec ision, 69 kMat44f_GrSLType, kDefault_GrSLPrec ision,
70 "YUVMatrix", &yuvMatrix); 70 "YUVMatrix", &yuvMatrix);
71 fsBuilder->codeAppendf("\t%s = vec4(\n\t\t", args.fOutputColor); 71 fsBuilder->codeAppendf("\t%s = vec4(\n\t\t", args.fOutputColor);
72 fsBuilder->appendTextureLookup(args.fSamplers[0], args.fCoords[0].c_ str(), 72 fsBuilder->appendTextureLookup(args.fSamplers[0], args.fCoords[0].c_ str(),
73 args.fCoords[0].getType()); 73 args.fCoords[0].getType());
74 fsBuilder->codeAppend(".r,\n\t\t"); 74 fsBuilder->codeAppend(".r,\n\t\t");
75 fsBuilder->appendTextureLookup(args.fSamplers[1], args.fCoords[1].c_ str(), 75 fsBuilder->appendTextureLookup(args.fSamplers[1], args.fCoords[1].c_ str(),
76 args.fCoords[1].getType()); 76 args.fCoords[1].getType());
77 fsBuilder->codeAppend(".r,\n\t\t"); 77 fsBuilder->codeAppend(".r,\n\t\t");
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 ////////////////////////////////////////////////////////////////////////////// 172 //////////////////////////////////////////////////////////////////////////////
173 173
174 GrFragmentProcessor* 174 GrFragmentProcessor*
175 GrYUVtoRGBEffect::Create(GrProcessorDataManager* procDataManager, GrTexture* yTe xture, 175 GrYUVtoRGBEffect::Create(GrProcessorDataManager* procDataManager, GrTexture* yTe xture,
176 GrTexture* uTexture, GrTexture* vTexture, const SkISize sizes[3], 176 GrTexture* uTexture, GrTexture* vTexture, const SkISize sizes[3],
177 SkYUVColorSpace colorSpace) { 177 SkYUVColorSpace colorSpace) {
178 SkASSERT(procDataManager && yTexture && uTexture && vTexture && sizes); 178 SkASSERT(procDataManager && yTexture && uTexture && vTexture && sizes);
179 return YUVtoRGBEffect::Create(procDataManager, yTexture, uTexture, vTexture, sizes, colorSpace); 179 return YUVtoRGBEffect::Create(procDataManager, yTexture, uTexture, vTexture, sizes, colorSpace);
180 } 180 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureStripAtlas.cpp ('k') | src/gpu/gl/GrGLAssembleInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698