Home
last modified time | relevance | path

Searched refs:pb_prim (Results 1 – 2 of 2) sorted by relevance

/frameworks/base/tools/aapt2/format/proto/
DProtoSerialize.cpp496 pb::Primitive* pb_prim = out_value_->mutable_item()->mutable_prim(); in Visit() local
501 pb_prim->set_allocated_null_value(new pb::Primitive_NullType()); in Visit()
503 pb_prim->set_allocated_empty_value(new pb::Primitive_EmptyType()); in Visit()
509 pb_prim->set_float_value(*(float*)&val.data); in Visit()
512 pb_prim->set_dimension_value(val.data); in Visit()
515 pb_prim->set_fraction_value(val.data); in Visit()
518 pb_prim->set_int_decimal_value(static_cast<int32_t>(val.data)); in Visit()
521 pb_prim->set_int_hexadecimal_value(val.data); in Visit()
524 pb_prim->set_boolean_value(static_cast<bool>(val.data)); in Visit()
527 pb_prim->set_color_argb8_value(val.data); in Visit()
[all …]
DProtoDeserialize.cpp826 const pb::Primitive& pb_prim = pb_item.prim(); in DeserializeItemFromPb() local
828 switch (pb_prim.oneof_value_case()) { in DeserializeItemFromPb()
839 float float_val = pb_prim.float_value(); in DeserializeItemFromPb()
844 val.data = pb_prim.dimension_value(); in DeserializeItemFromPb()
848 val.data = pb_prim.fraction_value(); in DeserializeItemFromPb()
852 val.data = static_cast<uint32_t>(pb_prim.int_decimal_value()); in DeserializeItemFromPb()
856 val.data = pb_prim.int_hexadecimal_value(); in DeserializeItemFromPb()
860 val.data = pb_prim.boolean_value() ? 0xFFFFFFFF : 0x0; in DeserializeItemFromPb()
864 val.data = pb_prim.color_argb8_value(); in DeserializeItemFromPb()
868 val.data = pb_prim.color_rgb8_value(); in DeserializeItemFromPb()
[all …]