OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkDisplayType.h" | 10 #include "SkDisplayType.h" |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 SkAnimateMaker* maker = animator.fMaker; | 723 SkAnimateMaker* maker = animator.fMaker; |
724 int index; | 724 int index; |
725 for (index = 0; index < kTypeNamesSize - 1; index++) { | 725 for (index = 0; index < kTypeNamesSize - 1; index++) { |
726 SkASSERT(strcmp(gTypeNames[index].fName, gTypeNames[index + 1].fName) <
0); | 726 SkASSERT(strcmp(gTypeNames[index].fName, gTypeNames[index + 1].fName) <
0); |
727 SkASSERT(gTypeNames[index].fType < gTypeNames[index + 1].fType); | 727 SkASSERT(gTypeNames[index].fType < gTypeNames[index + 1].fType); |
728 } | 728 } |
729 for (index = 0; index < kTypeNamesSize; index++) { | 729 for (index = 0; index < kTypeNamesSize; index++) { |
730 SkDisplayable* test = CreateInstance(maker, gTypeNames[index].fType); | 730 SkDisplayable* test = CreateInstance(maker, gTypeNames[index].fType); |
731 if (test == nullptr) | 731 if (test == nullptr) |
732 continue; | 732 continue; |
733 #if defined _WIN32 && _MSC_VER >= 1300 && defined _INC_CRTDBG // only on window
s, only if using "crtdbg.h" | 733 #if defined _WIN32 && defined _INC_CRTDBG // only on windows, only if using "crt
dbg.h" |
734 // we know that crtdbg puts 0xfdfdfdfd at the end of the block | 734 // we know that crtdbg puts 0xfdfdfdfd at the end of the block |
735 // look for unitialized memory, signature 0xcdcdcdcd prior to that | 735 // look for unitialized memory, signature 0xcdcdcdcd prior to that |
736 int* start = (int*) test; | 736 int* start = (int*) test; |
737 while (*start != 0xfdfdfdfd) { | 737 while (*start != 0xfdfdfdfd) { |
738 SkASSERT(*start != 0xcdcdcdcd); | 738 SkASSERT(*start != 0xcdcdcdcd); |
739 start++; | 739 start++; |
740 } | 740 } |
741 #endif | 741 #endif |
742 delete test; | 742 delete test; |
743 } | 743 } |
744 for (index = 0; index < kTypeNamesSize; index++) { | 744 for (index = 0; index < kTypeNamesSize; index++) { |
745 int infoCount; | 745 int infoCount; |
746 const SkMemberInfo* info = GetMembers(maker, gTypeNames[index].fType, &i
nfoCount); | 746 const SkMemberInfo* info = GetMembers(maker, gTypeNames[index].fType, &i
nfoCount); |
747 if (info == nullptr) | 747 if (info == nullptr) |
748 continue; | 748 continue; |
749 #if SK_USE_CONDENSED_INFO == 0 | 749 #if SK_USE_CONDENSED_INFO == 0 |
750 for (int inner = 0; inner < infoCount - 1; inner++) { | 750 for (int inner = 0; inner < infoCount - 1; inner++) { |
751 if (info[inner].fType == SkType_BaseClassInfo) | 751 if (info[inner].fType == SkType_BaseClassInfo) |
752 continue; | 752 continue; |
753 SkASSERT(strcmp(info[inner].fName, info[inner + 1].fName) < 0); | 753 SkASSERT(strcmp(info[inner].fName, info[inner + 1].fName) < 0); |
754 } | 754 } |
755 #endif | 755 #endif |
756 } | 756 } |
757 #if defined SK_DEBUG || defined SK_BUILD_CONDENSED | 757 #if defined SK_DEBUG || defined SK_BUILD_CONDENSED |
758 BuildCondensedInfo(maker); | 758 BuildCondensedInfo(maker); |
759 #endif | 759 #endif |
760 } | 760 } |
761 #endif | 761 #endif |
OLD | NEW |