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

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

Issue 1133123009: rename GrDrawTargetCaps to GrCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gypi filename Created 5 years, 7 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/GrRRectEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.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 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 "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "GrTexture.h" 10 #include "GrTexture.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 GrGLFragmentProcessor* GrSimpleTextureEffect::createGLInstance() const { 51 GrGLFragmentProcessor* GrSimpleTextureEffect::createGLInstance() const {
52 return SkNEW_ARGS(GrGLSimpleTextureEffect, (*this)); 52 return SkNEW_ARGS(GrGLSimpleTextureEffect, (*this));
53 } 53 }
54 54
55 /////////////////////////////////////////////////////////////////////////////// 55 ///////////////////////////////////////////////////////////////////////////////
56 56
57 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect); 57 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect);
58 58
59 GrFragmentProcessor* GrSimpleTextureEffect::TestCreate(SkRandom* random, 59 GrFragmentProcessor* GrSimpleTextureEffect::TestCreate(SkRandom* random,
60 GrContext*, 60 GrContext*,
61 const GrDrawTargetCaps&, 61 const GrCaps&,
62 GrTexture* textures[]) { 62 GrTexture* textures[]) {
63 int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : 63 int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
64 GrProcessorUnitTest::kAlphaTextureIdx; 64 GrProcessorUnitTest::kAlphaTextureIdx;
65 static const SkShader::TileMode kTileModes[] = { 65 static const SkShader::TileMode kTileModes[] = {
66 SkShader::kClamp_TileMode, 66 SkShader::kClamp_TileMode,
67 SkShader::kRepeat_TileMode, 67 SkShader::kRepeat_TileMode,
68 SkShader::kMirror_TileMode, 68 SkShader::kMirror_TileMode,
69 }; 69 };
70 SkShader::TileMode tileModes[] = { 70 SkShader::TileMode tileModes[] = {
71 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 71 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
72 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], 72 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
73 }; 73 };
74 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode : 74 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil erp_FilterMode :
75 GrTextureParams::kNon e_FilterMode); 75 GrTextureParams::kNon e_FilterMode);
76 76
77 static const GrCoordSet kCoordSets[] = { 77 static const GrCoordSet kCoordSets[] = {
78 kLocal_GrCoordSet, 78 kLocal_GrCoordSet,
79 kDevice_GrCoordSet 79 kDevice_GrCoordSet
80 }; 80 };
81 GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoord Sets))]; 81 GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoord Sets))];
82 82
83 const SkMatrix& matrix = GrTest::TestMatrix(random); 83 const SkMatrix& matrix = GrTest::TestMatrix(random);
84 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet); 84 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet);
85 } 85 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrRRectEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698