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

Side by Side Diff: src/gpu/effects/GrSimpleTextureEffect.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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/GrSimpleTextureEffect.h ('k') | src/gpu/effects/GrTextureDomain.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 2012 Google Inc. 2 * Copyright 2012 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 "GrSimpleTextureEffect.h" 8 #include "GrSimpleTextureEffect.h"
9 #include "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "GrTexture.h" 10 #include "GrTexture.h"
11 #include "gl/GrGLCaps.h" 11 #include "gl/GrGLCaps.h"
12 #include "gl/GrGLProcessor.h" 12 #include "gl/GrGLProcessor.h"
13 #include "gl/GrGLSL.h" 13 #include "gl/GrGLSL.h"
14 #include "gl/GrGLTexture.h" 14 #include "gl/GrGLTexture.h"
15 #include "gl/builders/GrGLProgramBuilder.h" 15 #include "gl/builders/GrGLProgramBuilder.h"
16 16
17 class GrGLSimpleTextureEffect : public GrGLFragmentProcessor { 17 class GrGLSimpleTextureEffect : public GrGLFragmentProcessor {
18 public: 18 public:
19 GrGLSimpleTextureEffect(const GrProcessor&) {} 19 GrGLSimpleTextureEffect(const GrProcessor&) {}
20 20
21 virtual void emitCode(GrGLFPBuilder* builder, 21 virtual void emitCode(GrGLFPBuilder* builder,
22 const GrFragmentProcessor& fp, 22 const GrFragmentProcessor& fp,
23 const char* outputColor, 23 const char* outputColor,
24 const char* inputColor, 24 const char* inputColor,
25 const TransformedCoordsArray& coords, 25 const TransformedCoordsArray& coords,
26 const TextureSamplerArray& samplers) SK_OVERRIDE { 26 const TextureSamplerArray& samplers) override {
27 GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); 27 GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
28 fsBuilder->codeAppendf("\t%s = ", outputColor); 28 fsBuilder->codeAppendf("\t%s = ", outputColor);
29 fsBuilder->appendTextureLookupAndModulate(inputColor, 29 fsBuilder->appendTextureLookupAndModulate(inputColor,
30 samplers[0], 30 samplers[0],
31 coords[0].c_str(), 31 coords[0].c_str(),
32 coords[0].getType()); 32 coords[0].getType());
33 fsBuilder->codeAppend(";\n"); 33 fsBuilder->codeAppend(";\n");
34 } 34 }
35 35
36 private: 36 private:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 static const GrCoordSet kCoordSets[] = { 77 static const GrCoordSet kCoordSets[] = {
78 kLocal_GrCoordSet, 78 kLocal_GrCoordSet,
79 kDevice_GrCoordSet 79 kDevice_GrCoordSet
80 }; 80 };
81 GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoord Sets))]; 81 GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoord Sets))];
82 82
83 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random); 83 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random);
84 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet); 84 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet);
85 } 85 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.h ('k') | src/gpu/effects/GrTextureDomain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698