Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: src/core/SkBitmapHeap.cpp

Issue 105893012: change offset to xy for pixelref subsetting (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBitmapHeap.h ('k') | src/core/SkOrderedWriteBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapHeap.cpp
diff --git a/src/core/SkBitmapHeap.cpp b/src/core/SkBitmapHeap.cpp
index 1f2f3dcf36e0cc70681110887f17c9798a7fa999..7904492f4605467bf9042b6181273511a905ca0f 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;
« no previous file with comments | « src/core/SkBitmapHeap.h ('k') | src/core/SkOrderedWriteBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698