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

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

Issue 356513003: Step towards variable length effect keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak comment 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
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/GrGLShaderBuilder.h"
10 #include "gl/GrGLSL.h" 11 #include "gl/GrGLSL.h"
11 #include "gl/GrGLTexture.h" 12 #include "gl/GrGLTexture.h"
12 #include "gl/GrGLVertexEffect.h" 13 #include "gl/GrGLVertexEffect.h"
13 #include "GrTBackendEffectFactory.h" 14 #include "GrTBackendEffectFactory.h"
14 #include "GrTexture.h" 15 #include "GrTexture.h"
15 16
16 class GrGLCustomCoordsTextureEffect : public GrGLVertexEffect { 17 class GrGLCustomCoordsTextureEffect : public GrGLVertexEffect {
17 public: 18 public:
18 GrGLCustomCoordsTextureEffect(const GrBackendEffectFactory& factory, const G rDrawEffect& drawEffect) 19 GrGLCustomCoordsTextureEffect(const GrBackendEffectFactory& factory, const G rDrawEffect& drawEffect)
19 : INHERITED (factory) {} 20 : INHERITED (factory) {}
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 }; 98 };
98 SkShader::TileMode tileModes[] = { 99 SkShader::TileMode tileModes[] = {
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 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
101 }; 102 };
102 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode : 103 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode :
103 GrTextureParams::kNon e_FilterMode); 104 GrTextureParams::kNon e_FilterMode);
104 105
105 return GrCustomCoordsTextureEffect::Create(textures[texIdx], params); 106 return GrCustomCoordsTextureEffect::Create(textures[texIdx], params);
106 } 107 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698