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

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

Issue 20362002: make the filter mode for GrTextureAccess an enum so we can plumb down (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fall back to mipmaps for HQ sampling (for now) Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.h ('k') | src/gpu/effects/GrSingleTextureEffect.h » ('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 2012 Google Inc. 2 * Copyright 2012 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 "GrSimpleTextureEffect.h" 8 #include "GrSimpleTextureEffect.h"
9 #include "gl/GrGLEffect.h" 9 #include "gl/GrGLEffect.h"
10 #include "gl/GrGLEffectMatrix.h" 10 #include "gl/GrGLEffectMatrix.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 GrEffectUnitTest::kAlphaTextureIdx; 103 GrEffectUnitTest::kAlphaTextureIdx;
104 static const SkShader::TileMode kTileModes[] = { 104 static const SkShader::TileMode kTileModes[] = {
105 SkShader::kClamp_TileMode, 105 SkShader::kClamp_TileMode,
106 SkShader::kRepeat_TileMode, 106 SkShader::kRepeat_TileMode,
107 SkShader::kMirror_TileMode, 107 SkShader::kMirror_TileMode,
108 }; 108 };
109 SkShader::TileMode tileModes[] = { 109 SkShader::TileMode tileModes[] = {
110 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 110 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
111 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 111 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
112 }; 112 };
113 GrTextureParams params(tileModes, random->nextBool()); 113 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode :
114 GrTextureParams::kNon e_FilterMode);
114 115
115 static const CoordsType kCoordsTypes[] = { 116 static const CoordsType kCoordsTypes[] = {
116 kLocal_CoordsType, 117 kLocal_CoordsType,
117 kPosition_CoordsType, 118 kPosition_CoordsType,
118 kCustom_CoordsType 119 kCustom_CoordsType
119 }; 120 };
120 CoordsType coordsType = kCoordsTypes[random->nextULessThan(GR_ARRAY_COUNT(kC oordsTypes))]; 121 CoordsType coordsType = kCoordsTypes[random->nextULessThan(GR_ARRAY_COUNT(kC oordsTypes))];
121 122
122 if (kCustom_CoordsType == coordsType) { 123 if (kCustom_CoordsType == coordsType) {
123 return GrSimpleTextureEffect::CreateWithCustomCoords(textures[texIdx], p arams); 124 return GrSimpleTextureEffect::CreateWithCustomCoords(textures[texIdx], p arams);
124 } else { 125 } else {
125 const SkMatrix& matrix = GrEffectUnitTest::TestMatrix(random); 126 const SkMatrix& matrix = GrEffectUnitTest::TestMatrix(random);
126 return GrSimpleTextureEffect::Create(textures[texIdx], matrix); 127 return GrSimpleTextureEffect::Create(textures[texIdx], matrix);
127 } 128 }
128 } 129 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.h ('k') | src/gpu/effects/GrSingleTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698