OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |