OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 private: | 36 private: |
37 typedef GrGLFragmentProcessor INHERITED; | 37 typedef GrGLFragmentProcessor INHERITED; |
38 }; | 38 }; |
39 | 39 |
40 /////////////////////////////////////////////////////////////////////////////// | 40 /////////////////////////////////////////////////////////////////////////////// |
41 | 41 |
42 void GrSimpleTextureEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c
onst { | 42 void GrSimpleTextureEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c
onst { |
43 this->updateInvariantOutputForModulation(inout); | 43 this->updateInvariantOutputForModulation(inout); |
44 } | 44 } |
45 | 45 |
46 void GrSimpleTextureEffect::getGLProcessorKey(const GrGLCaps& caps, | 46 void GrSimpleTextureEffect::getGLProcessorKey(const GrGLSLCaps& caps, |
47 GrProcessorKeyBuilder* b) const { | 47 GrProcessorKeyBuilder* b) const { |
48 GrGLSimpleTextureEffect::GenKey(*this, caps, b); | 48 GrGLSimpleTextureEffect::GenKey(*this, caps, b); |
49 } | 49 } |
50 | 50 |
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 |
(...skipping 19 matching lines...) Expand all Loading... |
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 = GrProcessorUnitTest::TestMatrix(random); | 83 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random); |
84 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet); | 84 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet); |
85 } | 85 } |
OLD | NEW |