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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT 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/GrDistanceFieldGeoProc.h ('k') | src/gpu/effects/GrDitherEffect.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 "GrDistanceFieldGeoProc.h" 8 #include "GrDistanceFieldGeoProc.h"
9 #include "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "GrTexture.h" 10 #include "GrTexture.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 void GrDistanceFieldA8TextGeoProc::getGLProcessorKey(const GrBatchTracker& bt, 239 void GrDistanceFieldA8TextGeoProc::getGLProcessorKey(const GrBatchTracker& bt,
240 const GrGLSLCaps& caps, 240 const GrGLSLCaps& caps,
241 GrProcessorKeyBuilder* b) c onst { 241 GrProcessorKeyBuilder* b) c onst {
242 GrGLDistanceFieldA8TextGeoProc::GenKey(*this, bt, caps, b); 242 GrGLDistanceFieldA8TextGeoProc::GenKey(*this, bt, caps, b);
243 } 243 }
244 244
245 GrGLPrimitiveProcessor* 245 GrGLPrimitiveProcessor*
246 GrDistanceFieldA8TextGeoProc::createGLInstance(const GrBatchTracker& bt, 246 GrDistanceFieldA8TextGeoProc::createGLInstance(const GrBatchTracker& bt,
247 const GrGLSLCaps&) const { 247 const GrGLSLCaps&) const {
248 return SkNEW_ARGS(GrGLDistanceFieldA8TextGeoProc, (*this, bt)); 248 return new GrGLDistanceFieldA8TextGeoProc(*this, bt);
249 } 249 }
250 250
251 /////////////////////////////////////////////////////////////////////////////// 251 ///////////////////////////////////////////////////////////////////////////////
252 252
253 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldA8TextGeoProc); 253 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldA8TextGeoProc);
254 254
255 GrGeometryProcessor* GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorTestDat a* d) { 255 GrGeometryProcessor* GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorTestDat a* d) {
256 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : 256 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
257 GrProcessorUnitTest::kAlphaTextureIdx; 257 GrProcessorUnitTest::kAlphaTextureIdx;
258 static const SkShader::TileMode kTileModes[] = { 258 static const SkShader::TileMode kTileModes[] = {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 } 461 }
462 462
463 void GrDistanceFieldPathGeoProc::getGLProcessorKey(const GrBatchTracker& bt, 463 void GrDistanceFieldPathGeoProc::getGLProcessorKey(const GrBatchTracker& bt,
464 const GrGLSLCaps& caps, 464 const GrGLSLCaps& caps,
465 GrProcessorKeyBuilder* b) con st { 465 GrProcessorKeyBuilder* b) con st {
466 GrGLDistanceFieldPathGeoProc::GenKey(*this, bt, caps, b); 466 GrGLDistanceFieldPathGeoProc::GenKey(*this, bt, caps, b);
467 } 467 }
468 468
469 GrGLPrimitiveProcessor* 469 GrGLPrimitiveProcessor*
470 GrDistanceFieldPathGeoProc::createGLInstance(const GrBatchTracker& bt, const GrG LSLCaps&) const { 470 GrDistanceFieldPathGeoProc::createGLInstance(const GrBatchTracker& bt, const GrG LSLCaps&) const {
471 return SkNEW_ARGS(GrGLDistanceFieldPathGeoProc, (*this, bt)); 471 return new GrGLDistanceFieldPathGeoProc(*this, bt);
472 } 472 }
473 473
474 /////////////////////////////////////////////////////////////////////////////// 474 ///////////////////////////////////////////////////////////////////////////////
475 475
476 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldPathGeoProc); 476 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldPathGeoProc);
477 477
478 GrGeometryProcessor* GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTestData* d) { 478 GrGeometryProcessor* GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTestData* d) {
479 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx 479 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
480 : GrProcessorUnitTest::kAlphaTextureIdx; 480 : GrProcessorUnitTest::kAlphaTextureIdx;
481 static const SkShader::TileMode kTileModes[] = { 481 static const SkShader::TileMode kTileModes[] = {
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 734
735 void GrDistanceFieldLCDTextGeoProc::getGLProcessorKey(const GrBatchTracker& bt, 735 void GrDistanceFieldLCDTextGeoProc::getGLProcessorKey(const GrBatchTracker& bt,
736 const GrGLSLCaps& caps, 736 const GrGLSLCaps& caps,
737 GrProcessorKeyBuilder* b) const { 737 GrProcessorKeyBuilder* b) const {
738 GrGLDistanceFieldLCDTextGeoProc::GenKey(*this, bt, caps, b); 738 GrGLDistanceFieldLCDTextGeoProc::GenKey(*this, bt, caps, b);
739 } 739 }
740 740
741 GrGLPrimitiveProcessor* 741 GrGLPrimitiveProcessor*
742 GrDistanceFieldLCDTextGeoProc::createGLInstance(const GrBatchTracker& bt, 742 GrDistanceFieldLCDTextGeoProc::createGLInstance(const GrBatchTracker& bt,
743 const GrGLSLCaps&) const { 743 const GrGLSLCaps&) const {
744 return SkNEW_ARGS(GrGLDistanceFieldLCDTextGeoProc, (*this, bt)); 744 return new GrGLDistanceFieldLCDTextGeoProc(*this, bt);
745 } 745 }
746 746
747 /////////////////////////////////////////////////////////////////////////////// 747 ///////////////////////////////////////////////////////////////////////////////
748 748
749 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldLCDTextGeoProc); 749 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldLCDTextGeoProc);
750 750
751 GrGeometryProcessor* GrDistanceFieldLCDTextGeoProc::TestCreate(GrProcessorTestDa ta* d) { 751 GrGeometryProcessor* GrDistanceFieldLCDTextGeoProc::TestCreate(GrProcessorTestDa ta* d) {
752 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : 752 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
753 GrProcessorUnitTest::kAlphaTextureIdx; 753 GrProcessorUnitTest::kAlphaTextureIdx;
754 static const SkShader::TileMode kTileModes[] = { 754 static const SkShader::TileMode kTileModes[] = {
(...skipping 11 matching lines...) Expand all
766 uint32_t flags = kUseLCD_DistanceFieldEffectFlag; 766 uint32_t flags = kUseLCD_DistanceFieldEffectFlag;
767 flags |= d->fRandom->nextBool() ? kUniformScale_DistanceFieldEffectMask : 0; 767 flags |= d->fRandom->nextBool() ? kUniformScale_DistanceFieldEffectMask : 0;
768 flags |= d->fRandom->nextBool() ? kBGR_DistanceFieldEffectFlag : 0; 768 flags |= d->fRandom->nextBool() ? kBGR_DistanceFieldEffectFlag : 0;
769 return GrDistanceFieldLCDTextGeoProc::Create(GrRandomColor(d->fRandom), 769 return GrDistanceFieldLCDTextGeoProc::Create(GrRandomColor(d->fRandom),
770 GrTest::TestMatrix(d->fRandom), 770 GrTest::TestMatrix(d->fRandom),
771 d->fTextures[texIdx], params, 771 d->fTextures[texIdx], params,
772 wa, 772 wa,
773 flags, 773 flags,
774 d->fRandom->nextBool()); 774 d->fRandom->nextBool());
775 } 775 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDistanceFieldGeoProc.h ('k') | src/gpu/effects/GrDitherEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698