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 "SkAtomics.h" | 10 #include "SkAtomics.h" |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 this->setRect(rects[0]); | 592 this->setRect(rects[0]); |
593 for (int i = 1; i < count; i++) { | 593 for (int i = 1; i < count; i++) { |
594 this->op(rects[i], kUnion_Op); | 594 this->op(rects[i], kUnion_Op); |
595 } | 595 } |
596 } | 596 } |
597 return !this->isEmpty(); | 597 return !this->isEmpty(); |
598 } | 598 } |
599 | 599 |
600 /////////////////////////////////////////////////////////////////////////////// | 600 /////////////////////////////////////////////////////////////////////////////// |
601 | 601 |
602 #if defined _WIN32 && _MSC_VER >= 1300 // disable warning : local variable used
without having been initialized | 602 #if defined _WIN32 // disable warning : local variable used without having been
initialized |
603 #pragma warning ( push ) | 603 #pragma warning ( push ) |
604 #pragma warning ( disable : 4701 ) | 604 #pragma warning ( disable : 4701 ) |
605 #endif | 605 #endif |
606 | 606 |
607 #ifdef SK_DEBUG | 607 #ifdef SK_DEBUG |
608 static void assert_valid_pair(int left, int rite) | 608 static void assert_valid_pair(int left, int rite) |
609 { | 609 { |
610 SkASSERT(left == SkRegion::kRunTypeSentinel || left < rite); | 610 SkASSERT(left == SkRegion::kRunTypeSentinel || left < rite); |
611 } | 611 } |
612 #else | 612 #else |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 // update the right edge | 730 // update the right edge |
731 dst[-1] = (SkRegion::RunType)(rite); | 731 dst[-1] = (SkRegion::RunType)(rite); |
732 } | 732 } |
733 } | 733 } |
734 } | 734 } |
735 | 735 |
736 *dst++ = SkRegion::kRunTypeSentinel; | 736 *dst++ = SkRegion::kRunTypeSentinel; |
737 return dst; | 737 return dst; |
738 } | 738 } |
739 | 739 |
740 #if defined _WIN32 && _MSC_VER >= 1300 | 740 #if defined _WIN32 |
741 #pragma warning ( pop ) | 741 #pragma warning ( pop ) |
742 #endif | 742 #endif |
743 | 743 |
744 static const struct { | 744 static const struct { |
745 uint8_t fMin; | 745 uint8_t fMin; |
746 uint8_t fMax; | 746 uint8_t fMax; |
747 } gOpMinMax[] = { | 747 } gOpMinMax[] = { |
748 { 1, 1 }, // Difference | 748 { 1, 1 }, // Difference |
749 { 3, 3 }, // Intersection | 749 { 3, 3 }, // Intersection |
750 { 1, 3 }, // Union | 750 { 1, 3 }, // Union |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1470 bool SkRegion::debugSetRuns(const RunType runs[], int count) { | 1470 bool SkRegion::debugSetRuns(const RunType runs[], int count) { |
1471 // we need to make a copy, since the real method may modify the array, and | 1471 // we need to make a copy, since the real method may modify the array, and |
1472 // so it cannot be const. | 1472 // so it cannot be const. |
1473 | 1473 |
1474 SkAutoTArray<RunType> storage(count); | 1474 SkAutoTArray<RunType> storage(count); |
1475 memcpy(storage.get(), runs, count * sizeof(RunType)); | 1475 memcpy(storage.get(), runs, count * sizeof(RunType)); |
1476 return this->setRuns(storage.get(), count); | 1476 return this->setRuns(storage.get(), count); |
1477 } | 1477 } |
1478 | 1478 |
1479 #endif | 1479 #endif |
OLD | NEW |