blob: 77ce39e7a93abe3e035312c8ea22fee421a02e75 [file] [log] [blame]
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +00001/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "GrTextureDomain.h"
egdaniel605dd0f2014-11-12 08:35:25 -08009#include "GrInvariantOutput.h"
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000010#include "GrSimpleTextureEffect.h"
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000011#include "SkFloatingPoint.h"
egdaniel64c47282015-11-13 06:54:19 -080012#include "glsl/GrGLSLFragmentProcessor.h"
egdaniel7ea439b2015-12-03 09:20:44 -080013#include "glsl/GrGLSLFragmentShaderBuilder.h"
egdaniel018fb622015-10-28 07:26:40 -070014#include "glsl/GrGLSLProgramDataManager.h"
egdaniel7ea439b2015-12-03 09:20:44 -080015#include "glsl/GrGLSLShaderBuilder.h"
egdaniel7dc4bd02015-10-29 07:57:01 -070016#include "glsl/GrGLSLTextureSampler.h"
egdaniel7ea439b2015-12-03 09:20:44 -080017#include "glsl/GrGLSLUniformHandler.h"
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000018
19GrTextureDomain::GrTextureDomain(const SkRect& domain, Mode mode, int index)
20 : fIndex(index) {
21
22 static const SkRect kFullRect = {0, 0, SK_Scalar1, SK_Scalar1};
commit-bot@chromium.org26632632014-03-25 15:13:18 +000023 if (domain.contains(kFullRect) && kClamp_Mode == mode) {
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000024 fMode = kIgnore_Mode;
25 } else {
26 fMode = mode;
27 }
28
29 if (fMode != kIgnore_Mode) {
30 // We don't currently handle domains that are empty or don't intersect the texture.
31 // It is OK if the domain rect is a line or point, but it should not be inverted. We do not
32 // handle rects that do not intersect the [0..1]x[0..1] rect.
33 SkASSERT(domain.fLeft <= domain.fRight);
34 SkASSERT(domain.fTop <= domain.fBottom);
senorblancod0d37ca2015-04-02 04:54:56 -070035 fDomain.fLeft = SkScalarPin(domain.fLeft, kFullRect.fLeft, kFullRect.fRight);
36 fDomain.fRight = SkScalarPin(domain.fRight, kFullRect.fLeft, kFullRect.fRight);
37 fDomain.fTop = SkScalarPin(domain.fTop, kFullRect.fTop, kFullRect.fBottom);
38 fDomain.fBottom = SkScalarPin(domain.fBottom, kFullRect.fTop, kFullRect.fBottom);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000039 SkASSERT(fDomain.fLeft <= fDomain.fRight);
40 SkASSERT(fDomain.fTop <= fDomain.fBottom);
41 }
42}
43
44//////////////////////////////////////////////////////////////////////////////
45
egdaniel2d721d32015-11-11 13:06:05 -080046void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder,
egdaniel7ea439b2015-12-03 09:20:44 -080047 GrGLSLUniformHandler* uniformHandler,
egdaniela2e3e0f2015-11-19 07:23:45 -080048 const GrGLSLCaps* glslCaps,
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000049 const GrTextureDomain& textureDomain,
50 const char* outColor,
51 const SkString& inCoords,
egdaniel7dc4bd02015-10-29 07:57:01 -070052 const GrGLSLTextureSampler& sampler,
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000053 const char* inModulateColor) {
reed@google.comd7b1af62013-12-09 20:31:50 +000054 SkASSERT((Mode)-1 == fMode || textureDomain.mode() == fMode);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000055 SkDEBUGCODE(fMode = textureDomain.mode();)
56
joshualitt5ae5fc52014-07-29 12:59:27 -070057 if (textureDomain.mode() != kIgnore_Mode && !fDomainUni.isValid()) {
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000058 const char* name;
59 SkString uniName("TexDom");
60 if (textureDomain.fIndex >= 0) {
61 uniName.appendS32(textureDomain.fIndex);
62 }
cdalton5e58cee2016-02-11 12:49:47 -080063 fDomainUni = uniformHandler->addUniform(kFragment_GrShaderFlag,
egdaniel7ea439b2015-12-03 09:20:44 -080064 kVec4f_GrSLType, kDefault_GrSLPrecision,
65 uniName.c_str(), &name);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000066 fDomainName = name;
67 }
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000068
joshualitt5ae5fc52014-07-29 12:59:27 -070069 switch (textureDomain.mode()) {
70 case kIgnore_Mode: {
jvanverth3fc65602015-07-22 08:41:51 -070071 builder->codeAppendf("%s = ", outColor);
joshualitt30ba4362014-08-21 20:18:45 -070072 builder->appendTextureLookupAndModulate(inModulateColor, sampler,
joshualitt5ae5fc52014-07-29 12:59:27 -070073 inCoords.c_str());
jvanverth3fc65602015-07-22 08:41:51 -070074 builder->codeAppend(";");
joshualitt5ae5fc52014-07-29 12:59:27 -070075 break;
76 }
77 case kClamp_Mode: {
78 SkString clampedCoords;
jvanverth3fc65602015-07-22 08:41:51 -070079 clampedCoords.appendf("clamp(%s, %s.xy, %s.zw)",
joshualitt5ae5fc52014-07-29 12:59:27 -070080 inCoords.c_str(), fDomainName.c_str(), fDomainName.c_str());
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +000081
jvanverth3fc65602015-07-22 08:41:51 -070082 builder->codeAppendf("%s = ", outColor);
joshualitt30ba4362014-08-21 20:18:45 -070083 builder->appendTextureLookupAndModulate(inModulateColor, sampler,
joshualitt5ae5fc52014-07-29 12:59:27 -070084 clampedCoords.c_str());
jvanverth3fc65602015-07-22 08:41:51 -070085 builder->codeAppend(";");
joshualitt5ae5fc52014-07-29 12:59:27 -070086 break;
87 }
88 case kDecal_Mode: {
89 // Add a block since we're going to declare variables.
egdaniel2d721d32015-11-11 13:06:05 -080090 GrGLSLShaderBuilder::ShaderBlock block(builder);
joshualitt5ae5fc52014-07-29 12:59:27 -070091
92 const char* domain = fDomainName.c_str();
egdaniela2e3e0f2015-11-19 07:23:45 -080093 if (!glslCaps->canUseAnyFunctionInShader()) {
joshualitt5ae5fc52014-07-29 12:59:27 -070094 // On the NexusS and GalaxyNexus, the other path (with the 'any'
95 // call) causes the compilation error "Calls to any function that
96 // may require a gradient calculation inside a conditional block
97 // may return undefined results". This appears to be an issue with
98 // the 'any' call since even the simple "result=black; if (any())
99 // result=white;" code fails to compile.
jvanverth3fc65602015-07-22 08:41:51 -0700100 builder->codeAppend("vec4 outside = vec4(0.0, 0.0, 0.0, 0.0);");
101 builder->codeAppend("vec4 inside = ");
joshualitt30ba4362014-08-21 20:18:45 -0700102 builder->appendTextureLookupAndModulate(inModulateColor, sampler,
joshualitt5ae5fc52014-07-29 12:59:27 -0700103 inCoords.c_str());
jvanverth3fc65602015-07-22 08:41:51 -0700104 builder->codeAppend(";");
105
egdaniela2e3e0f2015-11-19 07:23:45 -0800106 builder->codeAppend(GrGLSLShaderVar::PrecisionString(glslCaps,
egdaniel0d3f0612015-10-21 10:45:48 -0700107 kHigh_GrSLPrecision));
jvanverth3fc65602015-07-22 08:41:51 -0700108 builder->codeAppendf("float x = (%s).x;", inCoords.c_str());
egdaniela2e3e0f2015-11-19 07:23:45 -0800109 builder->codeAppend(GrGLSLShaderVar::PrecisionString(glslCaps,
egdaniel0d3f0612015-10-21 10:45:48 -0700110 kHigh_GrSLPrecision));
jvanverth3fc65602015-07-22 08:41:51 -0700111 builder->codeAppendf("float y = (%s).y;", inCoords.c_str());
joshualitt5ae5fc52014-07-29 12:59:27 -0700112
jvanverth3fc65602015-07-22 08:41:51 -0700113 builder->codeAppendf("x = abs(2.0*(x - %s.x)/(%s.z - %s.x) - 1.0);",
114 domain, domain, domain);
115 builder->codeAppendf("y = abs(2.0*(y - %s.y)/(%s.w - %s.y) - 1.0);",
116 domain, domain, domain);
117 builder->codeAppend("float blend = step(1.0, max(x, y));");
118 builder->codeAppendf("%s = mix(inside, outside, blend);", outColor);
joshualitt5ae5fc52014-07-29 12:59:27 -0700119 } else {
jvanverth3fc65602015-07-22 08:41:51 -0700120 builder->codeAppend("bvec4 outside;\n");
121 builder->codeAppendf("outside.xy = lessThan(%s, %s.xy);", inCoords.c_str(),
joshualitt5ae5fc52014-07-29 12:59:27 -0700122 domain);
jvanverth3fc65602015-07-22 08:41:51 -0700123 builder->codeAppendf("outside.zw = greaterThan(%s, %s.zw);", inCoords.c_str(),
joshualitt5ae5fc52014-07-29 12:59:27 -0700124 domain);
jvanverth3fc65602015-07-22 08:41:51 -0700125 builder->codeAppendf("%s = any(outside) ? vec4(0.0, 0.0, 0.0, 0.0) : ",
joshualitt5ae5fc52014-07-29 12:59:27 -0700126 outColor);
joshualitt30ba4362014-08-21 20:18:45 -0700127 builder->appendTextureLookupAndModulate(inModulateColor, sampler,
joshualitt5ae5fc52014-07-29 12:59:27 -0700128 inCoords.c_str());
jvanverth3fc65602015-07-22 08:41:51 -0700129 builder->codeAppend(";");
joshualitt5ae5fc52014-07-29 12:59:27 -0700130 }
131 break;
132 }
133 case kRepeat_Mode: {
134 SkString clampedCoords;
jvanverth3fc65602015-07-22 08:41:51 -0700135 clampedCoords.printf("mod(%s - %s.xy, %s.zw - %s.xy) + %s.xy",
joshualitt5ae5fc52014-07-29 12:59:27 -0700136 inCoords.c_str(), fDomainName.c_str(), fDomainName.c_str(),
137 fDomainName.c_str(), fDomainName.c_str());
138
jvanverth3fc65602015-07-22 08:41:51 -0700139 builder->codeAppendf("%s = ", outColor);
joshualitt30ba4362014-08-21 20:18:45 -0700140 builder->appendTextureLookupAndModulate(inModulateColor, sampler,
joshualitt5ae5fc52014-07-29 12:59:27 -0700141 clampedCoords.c_str());
jvanverth3fc65602015-07-22 08:41:51 -0700142 builder->codeAppend(";");
joshualitt5ae5fc52014-07-29 12:59:27 -0700143 break;
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000144 }
145 }
146}
147
egdaniel018fb622015-10-28 07:26:40 -0700148void GrTextureDomain::GLDomain::setData(const GrGLSLProgramDataManager& pdman,
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000149 const GrTextureDomain& textureDomain,
150 GrSurfaceOrigin textureOrigin) {
151 SkASSERT(textureDomain.mode() == fMode);
152 if (kIgnore_Mode != textureDomain.mode()) {
egdaniel018fb622015-10-28 07:26:40 -0700153 float values[kPrevDomainCount] = {
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000154 SkScalarToFloat(textureDomain.domain().left()),
155 SkScalarToFloat(textureDomain.domain().top()),
156 SkScalarToFloat(textureDomain.domain().right()),
157 SkScalarToFloat(textureDomain.domain().bottom())
158 };
159 // vertical flip if necessary
160 if (kBottomLeft_GrSurfaceOrigin == textureOrigin) {
161 values[1] = 1.0f - values[1];
162 values[3] = 1.0f - values[3];
163 // The top and bottom were just flipped, so correct the ordering
164 // of elements so that values = (l, t, r, b).
165 SkTSwap(values[1], values[3]);
166 }
egdaniel018fb622015-10-28 07:26:40 -0700167 if (0 != memcmp(values, fPrevDomain, kPrevDomainCount * sizeof(float))) {
kkinnunen7510b222014-07-30 00:04:16 -0700168 pdman.set4fv(fDomainUni, 1, values);
egdaniel018fb622015-10-28 07:26:40 -0700169 memcpy(fPrevDomain, values, kPrevDomainCount * sizeof(float));
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000170 }
171 }
172}
173
174
175//////////////////////////////////////////////////////////////////////////////
176
egdaniel64c47282015-11-13 06:54:19 -0800177class GrGLTextureDomainEffect : public GrGLSLFragmentProcessor {
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000178public:
robertphillips9cdb9922016-02-03 12:25:40 -0800179 void emitCode(EmitArgs&) override;
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000180
jvanverthcfc18862015-04-28 08:48:20 -0700181 static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000182
wangyixb1daa862015-08-18 11:29:31 -0700183protected:
egdaniel018fb622015-10-28 07:26:40 -0700184 void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
wangyixb1daa862015-08-18 11:29:31 -0700185
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000186private:
187 GrTextureDomain::GLDomain fGLDomain;
egdaniel64c47282015-11-13 06:54:19 -0800188 typedef GrGLSLFragmentProcessor INHERITED;
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000189};
190
wangyix7c157a92015-07-22 15:08:53 -0700191void GrGLTextureDomainEffect::emitCode(EmitArgs& args) {
192 const GrTextureDomainEffect& textureDomainEffect = args.fFp.cast<GrTextureDomainEffect>();
joshualitt49586be2014-09-16 08:21:41 -0700193 const GrTextureDomain& domain = textureDomainEffect.textureDomain();
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000194
cdalton85285412016-02-18 12:37:07 -0800195 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
egdaniel4ca2e602015-11-18 08:01:26 -0800196 SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 0);
egdaniela2e3e0f2015-11-19 07:23:45 -0800197 fGLDomain.sampleTexture(fragBuilder,
egdaniel7ea439b2015-12-03 09:20:44 -0800198 args.fUniformHandler,
egdaniela2e3e0f2015-11-19 07:23:45 -0800199 args.fGLSLCaps,
200 domain,
201 args.fOutputColor,
202 coords2D,
203 args.fSamplers[0],
wangyix7c157a92015-07-22 15:08:53 -0700204 args.fInputColor);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000205}
206
egdaniel018fb622015-10-28 07:26:40 -0700207void GrGLTextureDomainEffect::onSetData(const GrGLSLProgramDataManager& pdman,
208 const GrProcessor& processor) {
joshualittb0a8a372014-09-23 09:50:21 -0700209 const GrTextureDomainEffect& textureDomainEffect = processor.cast<GrTextureDomainEffect>();
joshualitt49586be2014-09-16 08:21:41 -0700210 const GrTextureDomain& domain = textureDomainEffect.textureDomain();
joshualittb0a8a372014-09-23 09:50:21 -0700211 fGLDomain.setData(pdman, domain, processor.texture(0)->origin());
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000212}
213
jvanverthcfc18862015-04-28 08:48:20 -0700214void GrGLTextureDomainEffect::GenKey(const GrProcessor& processor, const GrGLSLCaps&,
joshualittb0a8a372014-09-23 09:50:21 -0700215 GrProcessorKeyBuilder* b) {
216 const GrTextureDomain& domain = processor.cast<GrTextureDomainEffect>().textureDomain();
bsalomon63e99f72014-07-21 08:03:14 -0700217 b->add32(GrTextureDomain::GLDomain::DomainKey(domain));
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000218}
219
220
221///////////////////////////////////////////////////////////////////////////////
222
bsalomon0ba8c242015-10-07 09:20:28 -0700223const GrFragmentProcessor* GrTextureDomainEffect::Create(GrTexture* texture,
224 const SkMatrix& matrix,
225 const SkRect& domain,
226 GrTextureDomain::Mode mode,
227 GrTextureParams::FilterMode filterMode,
228 GrCoordSet coordSet) {
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000229 static const SkRect kFullRect = {0, 0, SK_Scalar1, SK_Scalar1};
230 if (GrTextureDomain::kIgnore_Mode == mode ||
231 (GrTextureDomain::kClamp_Mode == mode && domain.contains(kFullRect))) {
bsalomon4a339522015-10-06 08:40:50 -0700232 return GrSimpleTextureEffect::Create(texture, matrix, filterMode);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000233 } else {
bsalomon4a339522015-10-06 08:40:50 -0700234 return new GrTextureDomainEffect(texture, matrix, domain, mode, filterMode, coordSet);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000235 }
236}
237
bsalomon4a339522015-10-06 08:40:50 -0700238GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture,
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000239 const SkMatrix& matrix,
240 const SkRect& domain,
241 GrTextureDomain::Mode mode,
242 GrTextureParams::FilterMode filterMode,
243 GrCoordSet coordSet)
bsalomon4a339522015-10-06 08:40:50 -0700244 : GrSingleTextureEffect(texture, matrix, filterMode, coordSet)
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000245 , fTextureDomain(domain, mode) {
joshualitt5ae5fc52014-07-29 12:59:27 -0700246 SkASSERT(mode != GrTextureDomain::kRepeat_Mode ||
247 filterMode == GrTextureParams::kNone_FilterMode);
joshualitteb2a6762014-12-04 11:35:33 -0800248 this->initClassID<GrTextureDomainEffect>();
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000249}
250
bsalomon0ba8c242015-10-07 09:20:28 -0700251GrTextureDomainEffect::~GrTextureDomainEffect() {}
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000252
egdaniel57d3b032015-11-13 11:57:27 -0800253void GrTextureDomainEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
254 GrProcessorKeyBuilder* b) const {
joshualitteb2a6762014-12-04 11:35:33 -0800255 GrGLTextureDomainEffect::GenKey(*this, caps, b);
256}
257
egdaniel57d3b032015-11-13 11:57:27 -0800258GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLSLInstance() const {
robertphillips9cdb9922016-02-03 12:25:40 -0800259 return new GrGLTextureDomainEffect;
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000260}
261
bsalomon0e08fc12014-10-15 08:19:04 -0700262bool GrTextureDomainEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
joshualitt49586be2014-09-16 08:21:41 -0700263 const GrTextureDomainEffect& s = sBase.cast<GrTextureDomainEffect>();
bsalomon420d7e92014-10-16 09:18:09 -0700264 return this->fTextureDomain == s.fTextureDomain;
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000265}
266
egdaniel605dd0f2014-11-12 08:35:25 -0800267void GrTextureDomainEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000268 if (GrTextureDomain::kDecal_Mode == fTextureDomain.mode()) { // TODO: helper
egdanielf8449ba2014-11-25 10:24:56 -0800269 if (GrPixelConfigIsAlphaOnly(this->texture(0)->config())) {
joshualitt56995b52014-12-11 15:44:02 -0800270 inout->mulByUnknownSingleComponent();
egdanielf8449ba2014-11-25 10:24:56 -0800271 } else {
joshualitt56995b52014-12-11 15:44:02 -0800272 inout->mulByUnknownFourComponents();
egdanielf8449ba2014-11-25 10:24:56 -0800273 }
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000274 } else {
egdaniel1a8ecdf2014-10-03 06:24:12 -0700275 this->updateInvariantOutputForModulation(inout);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000276 }
277}
278
279///////////////////////////////////////////////////////////////////////////////
280
joshualittb0a8a372014-09-23 09:50:21 -0700281GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrTextureDomainEffect);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000282
bsalomonc21b09e2015-08-28 18:46:56 -0700283const GrFragmentProcessor* GrTextureDomainEffect::TestCreate(GrProcessorTestData* d) {
joshualitt0067ff52015-07-08 14:26:19 -0700284 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
285 GrProcessorUnitTest::kAlphaTextureIdx;
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000286 SkRect domain;
joshualitt0067ff52015-07-08 14:26:19 -0700287 domain.fLeft = d->fRandom->nextUScalar1();
288 domain.fRight = d->fRandom->nextRangeScalar(domain.fLeft, SK_Scalar1);
289 domain.fTop = d->fRandom->nextUScalar1();
290 domain.fBottom = d->fRandom->nextRangeScalar(domain.fTop, SK_Scalar1);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000291 GrTextureDomain::Mode mode =
joshualitt0067ff52015-07-08 14:26:19 -0700292 (GrTextureDomain::Mode) d->fRandom->nextULessThan(GrTextureDomain::kModeCount);
293 const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
294 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
295 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrCoordSet;
bsalomon0ba8c242015-10-07 09:20:28 -0700296 return GrTextureDomainEffect::Create(
297 d->fTextures[texIdx],
298 matrix,
299 domain,
300 mode,
301 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_FilterMode,
302 coords);
commit-bot@chromium.org907fbd52013-12-09 17:03:02 +0000303}