summaryrefslogtreecommitdiffstats
path: root/libs/minikin/Layout.cpp
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2014-06-04 15:25:30 -0700
committerRaph Levien <raph@google.com>2014-06-05 09:26:43 -0700
commit3164d1a77eecf3185347a44342131f4275de824f (patch)
treed63c5539ffbe4a8f9e22cdaf8829482c57d48829 /libs/minikin/Layout.cpp
parent893399732b64203133c22ad3c1f3535e46bf35a7 (diff)
downloadandroid_frameworks_minikin-3164d1a77eecf3185347a44342131f4275de824f.tar.gz
android_frameworks_minikin-3164d1a77eecf3185347a44342131f4275de824f.tar.bz2
android_frameworks_minikin-3164d1a77eecf3185347a44342131f4275de824f.zip
Make paint flags consistently uint32_t
Change internal plumbing of paint flags (including CssParse) to uint32_t consistently, to match the type used in the client. This will probably prevent compiler warnings. Also renames "float" to "double" to avoid confusion about precision. Change-Id: I80374712c4067ca9e7711cc2d4ec33c440ab9c7c
Diffstat (limited to 'libs/minikin/Layout.cpp')
-rw-r--r--libs/minikin/Layout.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/minikin/Layout.cpp b/libs/minikin/Layout.cpp
index 5471b38..c66559a 100644
--- a/libs/minikin/Layout.cpp
+++ b/libs/minikin/Layout.cpp
@@ -512,13 +512,13 @@ void Layout::doLayout(const uint16_t* buf, size_t start, size_t count, size_t bu
ctx.props.parse(css);
ctx.style = styleFromCss(ctx.props);
- ctx.paint.size = ctx.props.value(fontSize).getFloatValue();
+ ctx.paint.size = ctx.props.value(fontSize).getDoubleValue();
ctx.paint.scaleX = ctx.props.hasTag(fontScaleX)
- ? ctx.props.value(fontScaleX).getFloatValue() : 1;
+ ? ctx.props.value(fontScaleX).getDoubleValue() : 1;
ctx.paint.skewX = ctx.props.hasTag(fontSkewX)
- ? ctx.props.value(fontSkewX).getFloatValue() : 0;
+ ? ctx.props.value(fontSkewX).getDoubleValue() : 0;
ctx.paint.paintFlags = ctx.props.hasTag(paintFlags)
- ?ctx.props.value(paintFlags).getIntValue() : 0;
+ ? ctx.props.value(paintFlags).getUintValue() : 0;
int bidiFlags = ctx.props.hasTag(minikinBidi) ? ctx.props.value(minikinBidi).getIntValue() : 0;
bool isRtl = (bidiFlags & kDirection_Mask) != 0;
bool doSingleRun = true;