aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/Sk64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/Sk64.h')
-rw-r--r--include/core/Sk64.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/core/Sk64.h b/include/core/Sk64.h
index 009744938f..c12a97c8a1 100644
--- a/include/core/Sk64.h
+++ b/include/core/Sk64.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2006 The Android Open Source Project
*
@@ -6,7 +5,6 @@
* found in the LICENSE file.
*/
-
#ifndef Sk64_DEFINED
#define Sk64_DEFINED
@@ -28,6 +26,11 @@ public:
int64_t as64() const { return ((int64_t)fHi << 32) | fLo; }
int64_t getLongLong() const { return this->as64(); }
+ void set64(int64_t value) {
+ fHi = (int32_t)(value >> 32);
+ fLo = (uint32_t)value;
+ }
+
/** Returns non-zero if the Sk64 can be represented as a signed 32 bit integer
*/
SkBool is32() const { return fHi == ((int32_t)fLo >> 31); }