| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
| 9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
| 10 | 10 |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 // indicate non-indexed drawing. | 918 // indicate non-indexed drawing. |
| 919 bool checkDraw(GrPrimitiveType type, int startVertex, | 919 bool checkDraw(GrPrimitiveType type, int startVertex, |
| 920 int startIndex, int vertexCount, | 920 int startIndex, int vertexCount, |
| 921 int indexCount) const; | 921 int indexCount) const; |
| 922 // called when setting a new vert/idx source to unref prev vb/ib | 922 // called when setting a new vert/idx source to unref prev vb/ib |
| 923 void releasePreviousVertexSource(); | 923 void releasePreviousVertexSource(); |
| 924 void releasePreviousIndexSource(); | 924 void releasePreviousIndexSource(); |
| 925 | 925 |
| 926 // Check to see if this set of draw commands has been sent out | 926 // Check to see if this set of draw commands has been sent out |
| 927 virtual bool isIssued(uint32_t drawID) { return true; } | 927 virtual bool isIssued(uint32_t drawID) { return true; } |
| 928 virtual GrClipMaskManager* clipMaskManager() = 0; | 928 virtual GrClipMaskManager* getClipMaskManager() = 0; |
| 929 | 929 |
| 930 enum { | 930 enum { |
| 931 kPreallocGeoSrcStateStackCnt = 4, | 931 kPreallocGeoSrcStateStackCnt = 4, |
| 932 }; | 932 }; |
| 933 SkSTArray<kPreallocGeoSrcStateStackCnt, GeometrySrcState, true> fGeoSrcState
Stack; | 933 SkSTArray<kPreallocGeoSrcStateStackCnt, GeometrySrcState, true> fGeoSrcState
Stack; |
| 934 const GrClipData* fClip; | 934 const GrClipData* fClip; |
| 935 GrDrawState* fDrawState; | 935 GrDrawState* fDrawState; |
| 936 GrDrawState fDefaultDraw
State; | 936 GrDrawState fDefaultDraw
State; |
| 937 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. | 937 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. |
| 938 GrContext* fContext; | 938 GrContext* fContext; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 virtual void purgeResources() SK_OVERRIDE { | 974 virtual void purgeResources() SK_OVERRIDE { |
| 975 // The clip mask manager can rebuild all its clip masks so just | 975 // The clip mask manager can rebuild all its clip masks so just |
| 976 // get rid of them all. | 976 // get rid of them all. |
| 977 fClipMaskManager.purgeResources(); | 977 fClipMaskManager.purgeResources(); |
| 978 }; | 978 }; |
| 979 | 979 |
| 980 protected: | 980 protected: |
| 981 GrClipMaskManager fClipMaskManager; | 981 GrClipMaskManager fClipMaskManager; |
| 982 | 982 |
| 983 private: | 983 private: |
| 984 GrClipMaskManager* clipMaskManager() { return &fClipMaskManager; } | 984 GrClipMaskManager* getClipMaskManager() { return &fClipMaskManager; } |
| 985 | 985 |
| 986 typedef GrDrawTarget INHERITED; | 986 typedef GrDrawTarget INHERITED; |
| 987 }; | 987 }; |
| 988 | 988 |
| 989 #endif | 989 #endif |
| OLD | NEW |