OLD | NEW |
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 #ifndef GrBitmapTextGeoProc_DEFINED | 8 #ifndef GrBitmapTextGeoProc_DEFINED |
9 #define GrBitmapTextGeoProc_DEFINED | 9 #define GrBitmapTextGeoProc_DEFINED |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 public: | 23 public: |
24 static GrGeometryProcessor* Create(GrColor color, GrTexture* tex, const GrTe
xtureParams& p, | 24 static GrGeometryProcessor* Create(GrColor color, GrTexture* tex, const GrTe
xtureParams& p, |
25 bool useColorAttrib, bool opaqueVertexCol
ors, | 25 bool useColorAttrib, bool opaqueVertexCol
ors, |
26 const SkMatrix& localMatrix) { | 26 const SkMatrix& localMatrix) { |
27 return SkNEW_ARGS(GrBitmapTextGeoProc, (color, tex, p, useColorAttrib, o
paqueVertexColors, | 27 return SkNEW_ARGS(GrBitmapTextGeoProc, (color, tex, p, useColorAttrib, o
paqueVertexColors, |
28 localMatrix)); | 28 localMatrix)); |
29 } | 29 } |
30 | 30 |
31 virtual ~GrBitmapTextGeoProc() {} | 31 virtual ~GrBitmapTextGeoProc() {} |
32 | 32 |
33 virtual const char* name() const SK_OVERRIDE { return "Texture"; } | 33 const char* name() const SK_OVERRIDE { return "Texture"; } |
34 | 34 |
35 const GrAttribute* inPosition() const { return fInPosition; } | 35 const GrAttribute* inPosition() const { return fInPosition; } |
36 const GrAttribute* inColor() const { return fInColor; } | 36 const GrAttribute* inColor() const { return fInColor; } |
37 const GrAttribute* inTextureCoords() const { return fInTextureCoords; } | 37 const GrAttribute* inTextureCoords() const { return fInTextureCoords; } |
38 | 38 |
39 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 39 virtual void getGLProcessorKey(const GrBatchTracker& bt, |
40 const GrGLCaps& caps, | 40 const GrGLCaps& caps, |
41 GrProcessorKeyBuilder* b) const SK_OVERRIDE; | 41 GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
42 | 42 |
43 virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) co
nst SK_OVERRIDE; | 43 GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) const SK_O
VERRIDE; |
44 | 44 |
45 void initBatchTracker(GrBatchTracker*, const InitBT&) const SK_OVERRIDE; | 45 void initBatchTracker(GrBatchTracker*, const InitBT&) const SK_OVERRIDE; |
46 bool onCanMakeEqual(const GrBatchTracker&, | 46 bool onCanMakeEqual(const GrBatchTracker&, |
47 const GrGeometryProcessor&, | 47 const GrGeometryProcessor&, |
48 const GrBatchTracker&) const SK_OVERRIDE; | 48 const GrBatchTracker&) const SK_OVERRIDE; |
49 | 49 |
50 private: | 50 private: |
51 GrBitmapTextGeoProc(GrColor, GrTexture* texture, const GrTextureParams& para
ms, | 51 GrBitmapTextGeoProc(GrColor, GrTexture* texture, const GrTextureParams& para
ms, |
52 bool useColorAttrib, bool opaqueVertexColors, const SkMa
trix& localMatrix); | 52 bool useColorAttrib, bool opaqueVertexColors, const SkMa
trix& localMatrix); |
53 | 53 |
54 virtual bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; | 54 bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; |
55 | 55 |
56 virtual void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_O
VERRIDE; | 56 void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; |
57 | 57 |
58 GrTextureAccess fTextureAccess; | 58 GrTextureAccess fTextureAccess; |
59 const GrAttribute* fInPosition; | 59 const GrAttribute* fInPosition; |
60 const GrAttribute* fInColor; | 60 const GrAttribute* fInColor; |
61 const GrAttribute* fInTextureCoords; | 61 const GrAttribute* fInTextureCoords; |
62 | 62 |
63 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 63 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
64 | 64 |
65 typedef GrGeometryProcessor INHERITED; | 65 typedef GrGeometryProcessor INHERITED; |
66 }; | 66 }; |
67 | 67 |
68 #endif | 68 #endif |
OLD | NEW |