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

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

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning 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/GrBezierEffect.cpp ('k') | src/gpu/effects/GrDashingEffect.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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 UniformHandle fColorUniform; 86 UniformHandle fColorUniform;
87 87
88 typedef GrGLGeometryProcessor INHERITED; 88 typedef GrGLGeometryProcessor INHERITED;
89 }; 89 };
90 90
91 /////////////////////////////////////////////////////////////////////////////// 91 ///////////////////////////////////////////////////////////////////////////////
92 92
93 GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color, GrTexture* texture, 93 GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color, GrTexture* texture,
94 const GrTextureParams& params, bool use ColorAttrib, 94 const GrTextureParams& params, bool use ColorAttrib,
95 bool opaqueVertexColors, const SkMatrix & localMatrix) 95 bool opaqueVertexColors, const SkMatrix & localMatrix)
96 : INHERITED(color, opaqueVertexColors, localMatrix) 96 : INHERITED(color, SkMatrix::I(), localMatrix, opaqueVertexColors)
97 , fTextureAccess(texture, params) 97 , fTextureAccess(texture, params)
98 , fInColor(NULL) { 98 , fInColor(NULL) {
99 this->initClassID<GrBitmapTextGeoProc>(); 99 this->initClassID<GrBitmapTextGeoProc>();
100 fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVert exAttribType)); 100 fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVert exAttribType));
101 if (useColorAttrib) { 101 if (useColorAttrib) {
102 fInColor = &this->addVertexAttrib(GrAttribute("inColor", kVec4ub_GrVerte xAttribType)); 102 fInColor = &this->addVertexAttrib(GrAttribute("inColor", kVec4ub_GrVerte xAttribType));
103 this->setHasVertexColor(); 103 this->setHasVertexColor();
104 } 104 }
105 fInTextureCoords = &this->addVertexAttrib(GrAttribute("inTextureCoords", 105 fInTextureCoords = &this->addVertexAttrib(GrAttribute("inTextureCoords",
106 kVec2f_GrVertexAttribT ype)); 106 kVec2f_GrVertexAttribT ype));
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 172 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
173 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 173 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
174 }; 174 };
175 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode : 175 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode :
176 GrTextureParams::kNon e_FilterMode); 176 GrTextureParams::kNon e_FilterMode);
177 177
178 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params, 178 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params,
179 random->nextBool(), random->nextBool(), 179 random->nextBool(), random->nextBool(),
180 GrProcessorUnitTest::TestMatrix(random)); 180 GrProcessorUnitTest::TestMatrix(random));
181 } 181 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBezierEffect.cpp ('k') | src/gpu/effects/GrDashingEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698