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

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

Issue 374923002: Goodbye GrEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@noref3
Patch Set: Address comments Created 6 years, 5 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/GrCustomCoordsTextureEffect.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 "GrCustomCoordsTextureEffect.h" 8 #include "GrCustomCoordsTextureEffect.h"
9 #include "gl/GrGLEffect.h" 9 #include "gl/GrGLEffect.h"
10 #include "gl/GrGLSL.h" 10 #include "gl/GrGLSL.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 const GrBackendEffectFactory& GrCustomCoordsTextureEffect::getFactory() const { 79 const GrBackendEffectFactory& GrCustomCoordsTextureEffect::getFactory() const {
80 return GrTBackendEffectFactory<GrCustomCoordsTextureEffect>::getInstance(); 80 return GrTBackendEffectFactory<GrCustomCoordsTextureEffect>::getInstance();
81 } 81 }
82 82
83 /////////////////////////////////////////////////////////////////////////////// 83 ///////////////////////////////////////////////////////////////////////////////
84 84
85 GR_DEFINE_EFFECT_TEST(GrCustomCoordsTextureEffect); 85 GR_DEFINE_EFFECT_TEST(GrCustomCoordsTextureEffect);
86 86
87 GrEffectRef* GrCustomCoordsTextureEffect::TestCreate(SkRandom* random, 87 GrEffect* GrCustomCoordsTextureEffect::TestCreate(SkRandom* random,
88 GrContext*, 88 GrContext*,
89 const GrDrawTargetCaps&, 89 const GrDrawTargetCaps&,
90 GrTexture* textures[]) { 90 GrTexture* textures[]) {
91 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx : 91 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
92 GrEffectUnitTest::kAlphaTextureIdx; 92 GrEffectUnitTest::kAlphaTextureIdx;
93 static const SkShader::TileMode kTileModes[] = { 93 static const SkShader::TileMode kTileModes[] = {
94 SkShader::kClamp_TileMode, 94 SkShader::kClamp_TileMode,
95 SkShader::kRepeat_TileMode, 95 SkShader::kRepeat_TileMode,
96 SkShader::kMirror_TileMode, 96 SkShader::kMirror_TileMode,
97 }; 97 };
98 SkShader::TileMode tileModes[] = { 98 SkShader::TileMode tileModes[] = {
99 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 99 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
100 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 100 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
101 }; 101 };
102 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode : 102 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode :
103 GrTextureParams::kNon e_FilterMode); 103 GrTextureParams::kNon e_FilterMode);
104 104
105 return GrCustomCoordsTextureEffect::Create(textures[texIdx], params); 105 return GrCustomCoordsTextureEffect::Create(textures[texIdx], params);
106 } 106 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomCoordsTextureEffect.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698