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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 // indicate non-indexed drawing. | 919 // indicate non-indexed drawing. |
920 bool checkDraw(GrPrimitiveType type, int startVertex, | 920 bool checkDraw(GrPrimitiveType type, int startVertex, |
921 int startIndex, int vertexCount, | 921 int startIndex, int vertexCount, |
922 int indexCount) const; | 922 int indexCount) const; |
923 // called when setting a new vert/idx source to unref prev vb/ib | 923 // called when setting a new vert/idx source to unref prev vb/ib |
924 void releasePreviousVertexSource(); | 924 void releasePreviousVertexSource(); |
925 void releasePreviousIndexSource(); | 925 void releasePreviousIndexSource(); |
926 | 926 |
927 // Check to see if this set of draw commands has been sent out | 927 // Check to see if this set of draw commands has been sent out |
928 virtual bool isIssued(uint32_t drawID) { return true; } | 928 virtual bool isIssued(uint32_t drawID) { return true; } |
929 virtual GrClipMaskManager* getClipMaskManager() = 0; | 929 virtual GrClipMaskManager* clipMaskManager() = 0; |
930 | 930 |
931 enum { | 931 enum { |
932 kPreallocGeoSrcStateStackCnt = 4, | 932 kPreallocGeoSrcStateStackCnt = 4, |
933 }; | 933 }; |
934 SkSTArray<kPreallocGeoSrcStateStackCnt, GeometrySrcState, true> fGeoSrcState
Stack; | 934 SkSTArray<kPreallocGeoSrcStateStackCnt, GeometrySrcState, true> fGeoSrcState
Stack; |
935 const GrClipData* fClip; | 935 const GrClipData* fClip; |
936 GrDrawState* fDrawState; | 936 GrDrawState* fDrawState; |
937 GrDrawState fDefaultDraw
State; | 937 GrDrawState fDefaultDraw
State; |
938 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. | 938 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. |
939 GrContext* fContext; | 939 GrContext* fContext; |
(...skipping 25 matching lines...) Expand all Loading... |
965 * ClipTarget subclass sets clip bit in the stencil buffer. The subclass | 965 * ClipTarget subclass sets clip bit in the stencil buffer. The subclass |
966 * is free to clear the remaining bits to zero if masked clears are more | 966 * is free to clear the remaining bits to zero if masked clears are more |
967 * expensive than clearing all bits. | 967 * expensive than clearing all bits. |
968 */ | 968 */ |
969 virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRender
Target* = NULL) = 0; | 969 virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRender
Target* = NULL) = 0; |
970 | 970 |
971 protected: | 971 protected: |
972 GrClipMaskManager fClipMaskManager; | 972 GrClipMaskManager fClipMaskManager; |
973 | 973 |
974 private: | 974 private: |
975 GrClipMaskManager* getClipMaskManager() { return &fClipMaskManager; } | 975 GrClipMaskManager* clipMaskManager() { return &fClipMaskManager; } |
976 | 976 |
977 typedef GrDrawTarget INHERITED; | 977 typedef GrDrawTarget INHERITED; |
978 }; | 978 }; |
979 | 979 |
980 #endif | 980 #endif |
OLD | NEW |