diff options
Diffstat (limited to 'src/core/SkBitmapHeap.cpp')
-rw-r--r-- | src/core/SkBitmapHeap.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/SkBitmapHeap.cpp b/src/core/SkBitmapHeap.cpp index 1f2f3dcf36..7904492f46 100644 --- a/src/core/SkBitmapHeap.cpp +++ b/src/core/SkBitmapHeap.cpp @@ -35,15 +35,23 @@ void SkBitmapHeapEntry::addReferences(int count) { /////////////////////////////////////////////////////////////////////////////// +static bool operator<(const SkIPoint& a, const SkIPoint& b) { + return *(const int64_t*)&a < *(const int64_t*)&b; +} + +static bool operator>(const SkIPoint& a, const SkIPoint& b) { + return *(const int64_t*)&a > *(const int64_t*)&b; +} + bool SkBitmapHeap::LookupEntry::Less(const SkBitmapHeap::LookupEntry& a, const SkBitmapHeap::LookupEntry& b) { if (a.fGenerationId < b.fGenerationId) { return true; } else if (a.fGenerationId > b.fGenerationId) { return false; - } else if (a.fPixelOffset < b.fPixelOffset) { + } else if (a.fPixelOrigin < b.fPixelOrigin) { return true; - } else if (a.fPixelOffset > b.fPixelOffset) { + } else if (a.fPixelOrigin > b.fPixelOrigin) { return false; } else if (a.fWidth < b.fWidth) { return true; |