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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 void GrBitmapTextGeoProc::getGLProcessorKey(const GrBatchTracker& bt, | 146 void GrBitmapTextGeoProc::getGLProcessorKey(const GrBatchTracker& bt, |
147 const GrGLSLCaps& caps, | 147 const GrGLSLCaps& caps, |
148 GrProcessorKeyBuilder* b) const { | 148 GrProcessorKeyBuilder* b) const { |
149 GrGLBitmapTextGeoProc::GenKey(*this, bt, caps, b); | 149 GrGLBitmapTextGeoProc::GenKey(*this, bt, caps, b); |
150 } | 150 } |
151 | 151 |
152 GrGLPrimitiveProcessor* | 152 GrGLPrimitiveProcessor* |
153 GrBitmapTextGeoProc::createGLInstance(const GrBatchTracker& bt, | 153 GrBitmapTextGeoProc::createGLInstance(const GrBatchTracker& bt, |
154 const GrGLSLCaps& caps) const { | 154 const GrGLSLCaps& caps) const { |
155 return SkNEW_ARGS(GrGLBitmapTextGeoProc, (*this, bt)); | 155 return new GrGLBitmapTextGeoProc(*this, bt); |
156 } | 156 } |
157 | 157 |
158 /////////////////////////////////////////////////////////////////////////////// | 158 /////////////////////////////////////////////////////////////////////////////// |
159 | 159 |
160 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrBitmapTextGeoProc); | 160 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrBitmapTextGeoProc); |
161 | 161 |
162 GrGeometryProcessor* GrBitmapTextGeoProc::TestCreate(GrProcessorTestData* d) { | 162 GrGeometryProcessor* GrBitmapTextGeoProc::TestCreate(GrProcessorTestData* d) { |
163 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
: | 163 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
: |
164 GrProcessorUnitTest::kAlphaTextureIdx; | 164 GrProcessorUnitTest::kAlphaTextureIdx; |
165 static const SkShader::TileMode kTileModes[] = { | 165 static const SkShader::TileMode kTileModes[] = { |
(...skipping 18 matching lines...) Expand all Loading... |
184 break; | 184 break; |
185 case 2: | 185 case 2: |
186 format = kARGB_GrMaskFormat; | 186 format = kARGB_GrMaskFormat; |
187 break; | 187 break; |
188 } | 188 } |
189 | 189 |
190 return GrBitmapTextGeoProc::Create(GrRandomColor(d->fRandom), d->fTextures[t
exIdx], params, | 190 return GrBitmapTextGeoProc::Create(GrRandomColor(d->fRandom), d->fTextures[t
exIdx], params, |
191 format, GrTest::TestMatrix(d->fRandom), | 191 format, GrTest::TestMatrix(d->fRandom), |
192 d->fRandom->nextBool()); | 192 d->fRandom->nextBool()); |
193 } | 193 } |
OLD | NEW |