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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 * ClipTarget subclass sets clip bit in the stencil buffer. The subclass | 830 * ClipTarget subclass sets clip bit in the stencil buffer. The subclass |
831 * is free to clear the remaining bits to zero if masked clears are more | 831 * is free to clear the remaining bits to zero if masked clears are more |
832 * expensive than clearing all bits. | 832 * expensive than clearing all bits. |
833 */ | 833 */ |
834 virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRender
Target* = NULL) = 0; | 834 virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRender
Target* = NULL) = 0; |
835 | 835 |
836 /** | 836 /** |
837 * Release any resources that are cached but not currently in use. This | 837 * Release any resources that are cached but not currently in use. This |
838 * is intended to give an application some recourse when resources are low. | 838 * is intended to give an application some recourse when resources are low. |
839 */ | 839 */ |
840 virtual void purgeResources() SK_OVERRIDE { | 840 void purgeResources() SK_OVERRIDE { |
841 // The clip mask manager can rebuild all its clip masks so just | 841 // The clip mask manager can rebuild all its clip masks so just |
842 // get rid of them all. | 842 // get rid of them all. |
843 fClipMaskManager.purgeResources(); | 843 fClipMaskManager.purgeResources(); |
844 }; | 844 }; |
845 | 845 |
846 protected: | 846 protected: |
847 GrClipMaskManager fClipMaskManager; | 847 GrClipMaskManager fClipMaskManager; |
848 | 848 |
849 private: | 849 private: |
850 GrClipMaskManager* clipMaskManager() SK_OVERRIDE { return &fClipMaskManager;
} | 850 GrClipMaskManager* clipMaskManager() SK_OVERRIDE { return &fClipMaskManager;
} |
851 | 851 |
852 virtual bool setupClip(GrDrawState*, | 852 virtual bool setupClip(GrDrawState*, |
853 GrDrawState::AutoRestoreEffects* are, | 853 GrDrawState::AutoRestoreEffects* are, |
854 GrDrawState::AutoRestoreStencil* ars, | 854 GrDrawState::AutoRestoreStencil* ars, |
855 GrScissorState* scissorState, | 855 GrScissorState* scissorState, |
856 const SkRect* devBounds) SK_OVERRIDE; | 856 const SkRect* devBounds) SK_OVERRIDE; |
857 | 857 |
858 typedef GrDrawTarget INHERITED; | 858 typedef GrDrawTarget INHERITED; |
859 }; | 859 }; |
860 | 860 |
861 #endif | 861 #endif |
OLD | NEW |