Loading libs/input/SpriteIcon.h +8 −21 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ namespace android { * Icon that a sprite displays, including its hotspot. */ struct SpriteIcon { inline SpriteIcon() : style(PointerIconStyle::TYPE_NULL), hotSpotX(0), hotSpotY(0) {} inline SpriteIcon(const graphics::Bitmap& bitmap, PointerIconStyle style, float hotSpotX, explicit SpriteIcon() = default; explicit SpriteIcon(const graphics::Bitmap& bitmap, PointerIconStyle style, float hotSpotX, float hotSpotY, bool drawNativeDropShadow) : bitmap(bitmap), style(style), Loading @@ -36,24 +36,11 @@ struct SpriteIcon { hotSpotY(hotSpotY), drawNativeDropShadow(drawNativeDropShadow) {} graphics::Bitmap bitmap; PointerIconStyle style; float hotSpotX; float hotSpotY; bool drawNativeDropShadow; inline SpriteIcon copy() const { return SpriteIcon(bitmap.copy(ANDROID_BITMAP_FORMAT_RGBA_8888), style, hotSpotX, hotSpotY, drawNativeDropShadow); } inline void reset() { bitmap.reset(); style = PointerIconStyle::TYPE_NULL; hotSpotX = 0; hotSpotY = 0; drawNativeDropShadow = false; } graphics::Bitmap bitmap{}; PointerIconStyle style{PointerIconStyle::TYPE_NULL}; float hotSpotX{}; float hotSpotY{}; bool drawNativeDropShadow{false}; inline bool isValid() const { return bitmap.isValid() && !bitmap.isEmpty(); } Loading Loading
libs/input/SpriteIcon.h +8 −21 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ namespace android { * Icon that a sprite displays, including its hotspot. */ struct SpriteIcon { inline SpriteIcon() : style(PointerIconStyle::TYPE_NULL), hotSpotX(0), hotSpotY(0) {} inline SpriteIcon(const graphics::Bitmap& bitmap, PointerIconStyle style, float hotSpotX, explicit SpriteIcon() = default; explicit SpriteIcon(const graphics::Bitmap& bitmap, PointerIconStyle style, float hotSpotX, float hotSpotY, bool drawNativeDropShadow) : bitmap(bitmap), style(style), Loading @@ -36,24 +36,11 @@ struct SpriteIcon { hotSpotY(hotSpotY), drawNativeDropShadow(drawNativeDropShadow) {} graphics::Bitmap bitmap; PointerIconStyle style; float hotSpotX; float hotSpotY; bool drawNativeDropShadow; inline SpriteIcon copy() const { return SpriteIcon(bitmap.copy(ANDROID_BITMAP_FORMAT_RGBA_8888), style, hotSpotX, hotSpotY, drawNativeDropShadow); } inline void reset() { bitmap.reset(); style = PointerIconStyle::TYPE_NULL; hotSpotX = 0; hotSpotY = 0; drawNativeDropShadow = false; } graphics::Bitmap bitmap{}; PointerIconStyle style{PointerIconStyle::TYPE_NULL}; float hotSpotX{}; float hotSpotY{}; bool drawNativeDropShadow{false}; inline bool isValid() const { return bitmap.isValid() && !bitmap.isEmpty(); } Loading