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

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

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 GrColor fColor; 120 GrColor fColor;
121 UniformHandle fColorUniform; 121 UniformHandle fColorUniform;
122 122
123 typedef GrGLGeometryProcessor INHERITED; 123 typedef GrGLGeometryProcessor INHERITED;
124 }; 124 };
125 125
126 /////////////////////////////////////////////////////////////////////////////// 126 ///////////////////////////////////////////////////////////////////////////////
127 127
128 GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color, GrTexture* texture, 128 GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color, GrTexture* texture,
129 const GrTextureParams& params, GrMaskFo rmat format, 129 const GrTextureParams& params, GrMaskFo rmat format,
130 const SkMatrix& localMatrix, bool usesL ocalCoords) 130 const SkMatrix& localMatrix, bool usesL ocalCoords,
131 GrRenderTarget* dst)
131 : fColor(color) 132 : fColor(color)
132 , fLocalMatrix(localMatrix) 133 , fLocalMatrix(localMatrix)
133 , fUsesLocalCoords(usesLocalCoords) 134 , fUsesLocalCoords(usesLocalCoords)
134 , fTextureAccess(texture, params) 135 , fTextureAccess(texture, params, dst)
135 , fInColor(nullptr) 136 , fInColor(nullptr)
136 , fMaskFormat(format) { 137 , fMaskFormat(format) {
137 this->initClassID<GrBitmapTextGeoProc>(); 138 this->initClassID<GrBitmapTextGeoProc>();
138 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertex AttribType)); 139 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertex AttribType));
139 140
140 // TODO we could think about removing this attribute if color is ignored, bu t unfortunately 141 // TODO we could think about removing this attribute if color is ignored, bu t unfortunately
141 // we don't do text positioning in batch, so we can't quite do that yet. 142 // we don't do text positioning in batch, so we can't quite do that yet.
142 bool hasVertexColor = kA8_GrMaskFormat == fMaskFormat; 143 bool hasVertexColor = kA8_GrMaskFormat == fMaskFormat;
143 if (hasVertexColor) { 144 if (hasVertexColor) {
144 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexA ttribType)); 145 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexA ttribType));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 case 1: 184 case 1:
184 format = kA565_GrMaskFormat; 185 format = kA565_GrMaskFormat;
185 break; 186 break;
186 case 2: 187 case 2:
187 format = kARGB_GrMaskFormat; 188 format = kARGB_GrMaskFormat;
188 break; 189 break;
189 } 190 }
190 191
191 return GrBitmapTextGeoProc::Create(GrRandomColor(d->fRandom), d->fTextures[t exIdx], params, 192 return GrBitmapTextGeoProc::Create(GrRandomColor(d->fRandom), d->fTextures[t exIdx], params,
192 format, GrTest::TestMatrix(d->fRandom), 193 format, GrTest::TestMatrix(d->fRandom),
193 d->fRandom->nextBool()); 194 d->fRandom->nextBool(), NULL);
194 } 195 }
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