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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
10 | 10 |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 | 820 |
821 class AutoClip : public ::SkNoncopyable { | 821 class AutoClip : public ::SkNoncopyable { |
822 public: | 822 public: |
823 // This enum exists to require a caller of the constructor to acknowledg
e that the clip will | 823 // This enum exists to require a caller of the constructor to acknowledg
e that the clip will |
824 // initially be wide open. It also could be extended if there are other
desirable initial | 824 // initially be wide open. It also could be extended if there are other
desirable initial |
825 // clip states. | 825 // clip states. |
826 enum InitialClip { | 826 enum InitialClip { |
827 kWideOpen_InitialClip, | 827 kWideOpen_InitialClip, |
828 }; | 828 }; |
829 | 829 |
830 AutoClip(GrContext* context, InitialClip initialState) | 830 AutoClip(GrContext* context, InitialClip SkDEBUGCODE(initialState)) |
831 : fContext(context) { | 831 : fContext(context) { |
832 SkASSERT(kWideOpen_InitialClip == initialState); | 832 SkASSERT(kWideOpen_InitialClip == initialState); |
833 fNewClipData.fClipStack = &fNewClipStack; | 833 fNewClipData.fClipStack = &fNewClipStack; |
834 | 834 |
835 fOldClip = context->getClip(); | 835 fOldClip = context->getClip(); |
836 context->setClip(&fNewClipData); | 836 context->setClip(&fNewClipData); |
837 } | 837 } |
838 | 838 |
839 AutoClip(GrContext* context, const SkRect& newClipRect) | 839 AutoClip(GrContext* context, const SkRect& newClipRect) |
840 : fContext(context) | 840 : fContext(context) |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 /** | 1016 /** |
1017 * This callback allows the resource cache to callback into the GrContext | 1017 * This callback allows the resource cache to callback into the GrContext |
1018 * when the cache is still overbudget after a purge. | 1018 * when the cache is still overbudget after a purge. |
1019 */ | 1019 */ |
1020 static bool OverbudgetCB(void* data); | 1020 static bool OverbudgetCB(void* data); |
1021 | 1021 |
1022 typedef SkRefCnt INHERITED; | 1022 typedef SkRefCnt INHERITED; |
1023 }; | 1023 }; |
1024 | 1024 |
1025 #endif | 1025 #endif |
OLD | NEW |