OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #include "SkPictureRecord.h" | 8 #include "SkPictureRecord.h" |
9 #include "SkTSearch.h" | 9 #include "SkTSearch.h" |
10 #include "SkPixelRef.h" | 10 #include "SkPixelRef.h" |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 DrawType drawOp = peek_op_and_size(&fWriter, -offset, &opSize); | 763 DrawType drawOp = peek_op_and_size(&fWriter, -offset, &opSize); |
764 SkASSERT(SAVE == drawOp || SAVE_LAYER == drawOp); | 764 SkASSERT(SAVE == drawOp || SAVE_LAYER == drawOp); |
765 #endif | 765 #endif |
766 } | 766 } |
767 #endif | 767 #endif |
768 | 768 |
769 void SkPictureRecord::beginRecording() { | 769 void SkPictureRecord::beginRecording() { |
770 // we have to call this *after* our constructor, to ensure that it gets | 770 // we have to call this *after* our constructor, to ensure that it gets |
771 // recorded. This is balanced by restoreToCount() call from endRecording, | 771 // recorded. This is balanced by restoreToCount() call from endRecording, |
772 // which in-turn calls our overridden restore(), so those get recorded too. | 772 // which in-turn calls our overridden restore(), so those get recorded too. |
773 fInitialSaveCount = this->save(kMatrixClip_SaveFlag); | 773 fInitialSaveCount = this->save(); |
774 } | 774 } |
775 | 775 |
776 void SkPictureRecord::endRecording() { | 776 void SkPictureRecord::endRecording() { |
777 SkASSERT(kNoInitialSave != fInitialSaveCount); | 777 SkASSERT(kNoInitialSave != fInitialSaveCount); |
778 this->restoreToCount(fInitialSaveCount); | 778 this->restoreToCount(fInitialSaveCount); |
779 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE | 779 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE |
780 fMCMgr.finish(); | 780 fMCMgr.finish(); |
781 #endif | 781 #endif |
782 } | 782 } |
783 | 783 |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 void SkPictureRecord::validateRegions() const { | 1814 void SkPictureRecord::validateRegions() const { |
1815 int count = fRegions.count(); | 1815 int count = fRegions.count(); |
1816 SkASSERT((unsigned) count < 0x1000); | 1816 SkASSERT((unsigned) count < 0x1000); |
1817 for (int index = 0; index < count; index++) { | 1817 for (int index = 0; index < count; index++) { |
1818 const SkFlatData* region = fRegions[index]; | 1818 const SkFlatData* region = fRegions[index]; |
1819 SkASSERT(region); | 1819 SkASSERT(region); |
1820 // region->validate(); | 1820 // region->validate(); |
1821 } | 1821 } |
1822 } | 1822 } |
1823 #endif | 1823 #endif |
OLD | NEW |