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

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

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/GrBitmapTextGeoProc.h ('k') | src/gpu/effects/GrConfigConversionEffect.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 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 "GrBitmapTextGeoProc.h" 8 #include "GrBitmapTextGeoProc.h"
9 #include "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "GrTexture.h" 10 #include "GrTexture.h"
11 #include "gl/GrGLProcessor.h" 11 #include "gl/GrGLProcessor.h"
12 #include "gl/GrGLSL.h" 12 #include "gl/GrGLSL.h"
13 #include "gl/GrGLTexture.h" 13 #include "gl/GrGLTexture.h"
14 #include "gl/GrGLGeometryProcessor.h" 14 #include "gl/GrGLGeometryProcessor.h"
15 #include "gl/builders/GrGLProgramBuilder.h" 15 #include "gl/builders/GrGLProgramBuilder.h"
16 16
17 struct BitmapTextBatchTracker { 17 struct BitmapTextBatchTracker {
18 GrGPInput fInputColorType; 18 GrGPInput fInputColorType;
19 GrColor fColor; 19 GrColor fColor;
20 bool fUsesLocalCoords; 20 bool fUsesLocalCoords;
21 }; 21 };
22 22
23 class GrGLBitmapTextGeoProc : public GrGLGeometryProcessor { 23 class GrGLBitmapTextGeoProc : public GrGLGeometryProcessor {
24 public: 24 public:
25 GrGLBitmapTextGeoProc(const GrGeometryProcessor&, const GrBatchTracker&) 25 GrGLBitmapTextGeoProc(const GrGeometryProcessor&, const GrBatchTracker&)
26 : fColor(GrColor_ILLEGAL) {} 26 : fColor(GrColor_ILLEGAL) {}
27 27
28 virtual void emitCode(const EmitArgs& args) SK_OVERRIDE { 28 void emitCode(const EmitArgs& args) SK_OVERRIDE {
29 const GrBitmapTextGeoProc& cte = args.fGP.cast<GrBitmapTextGeoProc>(); 29 const GrBitmapTextGeoProc& cte = args.fGP.cast<GrBitmapTextGeoProc>();
30 const BitmapTextBatchTracker& local = args.fBT.cast<BitmapTextBatchTrack er>(); 30 const BitmapTextBatchTracker& local = args.fBT.cast<BitmapTextBatchTrack er>();
31 31
32 GrGLGPBuilder* pb = args.fPB; 32 GrGLGPBuilder* pb = args.fPB;
33 GrGLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder(); 33 GrGLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder();
34 34
35 GrGLVertToFrag v(kVec2f_GrSLType); 35 GrGLVertToFrag v(kVec2f_GrSLType);
36 pb->addVarying("TextureCoords", &v); 36 pb->addVarying("TextureCoords", &v);
37 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), cte.inTextureCoords()->fNa me); 37 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), cte.inTextureCoords()->fNa me);
38 38
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 177 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
178 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 178 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
179 }; 179 };
180 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode : 180 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode :
181 GrTextureParams::kNon e_FilterMode); 181 GrTextureParams::kNon e_FilterMode);
182 182
183 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params, 183 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params,
184 random->nextBool(), random->nextBool(), 184 random->nextBool(), random->nextBool(),
185 GrProcessorUnitTest::TestMatrix(random)); 185 GrProcessorUnitTest::TestMatrix(random));
186 } 186 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.h ('k') | src/gpu/effects/GrConfigConversionEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698