Index: Source/platform/LayoutUnit.h |
diff --git a/Source/platform/LayoutUnit.h b/Source/platform/LayoutUnit.h |
index 4f677d1dd60f97ad79948760415d97bdbe7cf79e..2ea2be3511e6c70c67046826d13a60150ab6e3b8 100644 |
--- a/Source/platform/LayoutUnit.h |
+++ b/Source/platform/LayoutUnit.h |
@@ -222,12 +222,24 @@ private: |
ALWAYS_INLINE void setValue(int value) |
{ |
- m_value = saturatedSet(value, kLayoutUnitFractionalBits); |
+ // The inner function needs to be implemented as a template to |
+ // maintain a common interface for both C++ and ARM versions. The first |
+ // parameter specifies how many bits we saturate to (for ARM). |
+ m_value = saturatedSetSigned< |
+ 32-kLayoutUnitFractionalBits, |
Sami
2014/07/09 13:59:26
Please add spaces around the '-'.
picksi
2014/07/09 14:27:52
Done.
|
+ kLayoutUnitFractionalBits>(value); |
} |
- inline void setValue(unsigned value) |
+ ALWAYS_INLINE void setValue(unsigned value) |
{ |
- m_value = saturatedSet(value, kLayoutUnitFractionalBits); |
+ // The inner function needs to be implemented as a template to |
+ // maintain a common interface for both C++ and ARM versions. The first |
+ // parameter specifies how many bits we saturate to (for ARM). This is |
+ // one bit less than the signed version due to the ARM instructions for |
+ // unsigned saturation. |
+ m_value = saturatedSetUnsigned< |
+ 31-kLayoutUnitFractionalBits, |
Sami
2014/07/09 13:59:26
Ditto.
picksi
2014/07/09 14:27:52
Done.
|
+ kLayoutUnitFractionalBits>(value); |
} |
int m_value; |