Isolate SpriteIcon into its own file.

This is to isolate differences between internal master and AOSP so that
the open source intern can work on a relatively new project.

It also isolates a divergent piece of code into SpriteIcon.cpp.

Bug: None
Test: Pointer icons in ApiDemos still work.
Change-Id: I1bf8f23411ad7170de2497d6fee0f70b015e9b5f
diff --git a/libs/input/SpriteController.h b/libs/input/SpriteController.h
index 2513544..137b564 100644
--- a/libs/input/SpriteController.h
+++ b/libs/input/SpriteController.h
@@ -20,9 +20,10 @@
 #include <utils/RefBase.h>
 #include <utils/Looper.h>
 
-#include <android/graphics/bitmap.h>
 #include <gui/SurfaceComposerClient.h>
 
+#include "SpriteIcon.h"
+
 namespace android {
 
 /*
@@ -51,35 +52,6 @@
 };
 
 /*
- * Icon that a sprite displays, including its hotspot.
- */
-struct SpriteIcon {
-    inline SpriteIcon() : style(0), hotSpotX(0), hotSpotY(0) { }
-    inline SpriteIcon(const graphics::Bitmap& bitmap, int32_t style, float hotSpotX, float hotSpotY) :
-            bitmap(bitmap), style(style), hotSpotX(hotSpotX), hotSpotY(hotSpotY) { }
-
-    graphics::Bitmap bitmap;
-    int32_t style;
-    float hotSpotX;
-    float hotSpotY;
-
-    inline SpriteIcon copy() const {
-        return SpriteIcon(bitmap.copy(ANDROID_BITMAP_FORMAT_RGBA_8888), style, hotSpotX, hotSpotY);
-    }
-
-    inline void reset() {
-        bitmap.reset();
-        style = 0;
-        hotSpotX = 0;
-        hotSpotY = 0;
-    }
-
-    inline bool isValid() const {
-        return bitmap.isValid() && !bitmap.isEmpty();
-    }
-};
-
-/*
  * A sprite is a simple graphical object that is displayed on-screen above other layers.
  * The basic sprite class is an interface.
  * The implementation is provided by the sprite controller.