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

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

Issue 1313573005: Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Created 5 years, 3 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/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 new 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 const 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[] = {
166 SkShader::kClamp_TileMode, 166 SkShader::kClamp_TileMode,
167 SkShader::kRepeat_TileMode, 167 SkShader::kRepeat_TileMode,
168 SkShader::kMirror_TileMode, 168 SkShader::kMirror_TileMode,
169 }; 169 };
170 SkShader::TileMode tileModes[] = { 170 SkShader::TileMode tileModes[] = {
171 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 171 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
172 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 172 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
(...skipping 11 matching lines...) Expand all
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 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698