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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 virtual ~GrBitmapTextGeoProc() {} | 30 virtual ~GrBitmapTextGeoProc() {} |
31 | 31 |
32 const char* name() const override { return "Texture"; } | 32 const char* name() const override { return "Texture"; } |
33 | 33 |
34 const Attribute* inPosition() const { return fInPosition; } | 34 const Attribute* inPosition() const { return fInPosition; } |
35 const Attribute* inColor() const { return fInColor; } | 35 const Attribute* inColor() const { return fInColor; } |
36 const Attribute* inTextureCoords() const { return fInTextureCoords; } | 36 const Attribute* inTextureCoords() const { return fInTextureCoords; } |
37 GrMaskFormat maskFormat() const { return fMaskFormat; } | 37 GrMaskFormat maskFormat() const { return fMaskFormat; } |
38 GrColor color() const { return fColor; } | 38 GrColor color() const { return fColor; } |
| 39 const SkMatrix& localMatrix() const { return fLocalMatrix; } |
39 | 40 |
40 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 41 virtual void getGLProcessorKey(const GrBatchTracker& bt, |
41 const GrGLSLCaps& caps, | 42 const GrGLSLCaps& caps, |
42 GrProcessorKeyBuilder* b) const override; | 43 GrProcessorKeyBuilder* b) const override; |
43 | 44 |
44 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, | 45 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, |
45 const GrGLSLCaps& caps) con
st override; | 46 const GrGLSLCaps& caps) con
st override; |
46 | 47 |
47 void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override
; | 48 void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override
; |
48 | 49 |
49 private: | 50 private: |
50 GrBitmapTextGeoProc(GrColor, GrTexture* texture, const GrTextureParams& para
ms, | 51 GrBitmapTextGeoProc(GrColor, GrTexture* texture, const GrTextureParams& para
ms, |
51 GrMaskFormat format, const SkMatrix& localMatrix); | 52 GrMaskFormat format, const SkMatrix& localMatrix); |
52 | 53 |
53 GrColor fColor; | 54 GrColor fColor; |
| 55 SkMatrix fLocalMatrix; |
54 GrTextureAccess fTextureAccess; | 56 GrTextureAccess fTextureAccess; |
55 const Attribute* fInPosition; | 57 const Attribute* fInPosition; |
56 const Attribute* fInColor; | 58 const Attribute* fInColor; |
57 const Attribute* fInTextureCoords; | 59 const Attribute* fInTextureCoords; |
58 GrMaskFormat fMaskFormat; | 60 GrMaskFormat fMaskFormat; |
59 | 61 |
60 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 62 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
61 | 63 |
62 typedef GrGeometryProcessor INHERITED; | 64 typedef GrGeometryProcessor INHERITED; |
63 }; | 65 }; |
64 | 66 |
65 #endif | 67 #endif |
OLD | NEW |