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

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

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: removing dstread Created 5 years, 10 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/GrDashingEffect.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 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 GrProcessorKeyBuilder* b) const { 138 GrProcessorKeyBuilder* b) const {
139 GrGLBitmapTextGeoProc::GenKey(*this, bt, caps, b); 139 GrGLBitmapTextGeoProc::GenKey(*this, bt, caps, b);
140 } 140 }
141 141
142 GrGLPrimitiveProcessor* 142 GrGLPrimitiveProcessor*
143 GrBitmapTextGeoProc::createGLInstance(const GrBatchTracker& bt, 143 GrBitmapTextGeoProc::createGLInstance(const GrBatchTracker& bt,
144 const GrGLCaps& caps) const { 144 const GrGLCaps& caps) const {
145 return SkNEW_ARGS(GrGLBitmapTextGeoProc, (*this, bt)); 145 return SkNEW_ARGS(GrGLBitmapTextGeoProc, (*this, bt));
146 } 146 }
147 147
148 void GrBitmapTextGeoProc::initBatchTracker(GrBatchTracker* bt, const InitBT& ini t) const { 148 void GrBitmapTextGeoProc::initBatchTracker(GrBatchTracker* bt, const GrPipelineI nfo& init) const {
149 BitmapTextBatchTracker* local = bt->cast<BitmapTextBatchTracker>(); 149 BitmapTextBatchTracker* local = bt->cast<BitmapTextBatchTracker>();
150 local->fInputColorType = GetColorInputType(&local->fColor, this->color(), in it, 150 local->fInputColorType = GetColorInputType(&local->fColor, this->color(), in it,
151 SkToBool(fInColor)); 151 SkToBool(fInColor));
152 local->fUsesLocalCoords = init.fUsesLocalCoords; 152 local->fUsesLocalCoords = init.fUsesLocalCoords;
153 } 153 }
154 154
155 bool GrBitmapTextGeoProc::onCanMakeEqual(const GrBatchTracker& m, 155 bool GrBitmapTextGeoProc::onCanMakeEqual(const GrBatchTracker& m,
156 const GrGeometryProcessor& that, 156 const GrGeometryProcessor& that,
157 const GrBatchTracker& t) const { 157 const GrBatchTracker& t) const {
158 const BitmapTextBatchTracker& mine = m.cast<BitmapTextBatchTracker>(); 158 const BitmapTextBatchTracker& mine = m.cast<BitmapTextBatchTracker>();
(...skipping 23 matching lines...) Expand all
182 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 182 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
183 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 183 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
184 }; 184 };
185 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode : 185 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode :
186 GrTextureParams::kNon e_FilterMode); 186 GrTextureParams::kNon e_FilterMode);
187 187
188 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params, 188 return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params,
189 random->nextBool(), random->nextBool(), 189 random->nextBool(), random->nextBool(),
190 GrProcessorUnitTest::TestMatrix(random)); 190 GrProcessorUnitTest::TestMatrix(random));
191 } 191 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698