summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.h
diff options
context:
space:
mode:
authorGeoffrey Pitsch <gpitsch@google.com>2016-06-27 17:14:30 -0400
committerGeoffrey Pitsch <gpitsch@google.com>2016-06-29 09:35:21 -0400
commitdd214a796f8b97070645226d6a61f8651f9e13a0 (patch)
treef71f1440203bdf1c2c98c13f08c462d3175f4549 /cmds/bootanimation/BootAnimation.h
parent0e792f567ac1b37a75e94e1ff1017f2f152494ef (diff)
Support trimmed images in BootAnimation
Each frame directory may optionally contain a `trim.txt` to specify how the image was trimmed relative to the animation's full size. See FORMAT.md for more details. Bug: 29055299 Change-Id: I7a291e9a52b4bbe50a29c519f6a4d0e2cc0389d7
Diffstat (limited to 'cmds/bootanimation/BootAnimation.h')
-rw-r--r--cmds/bootanimation/BootAnimation.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index 1c3d53a59bb8..a093c9b87e75 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -79,6 +79,10 @@ private:
struct Frame {
String8 name;
FileMap* map;
+ int trimX;
+ int trimY;
+ int trimWidth;
+ int trimHeight;
mutable GLuint tid;
bool operator < (const Frame& rhs) const {
return name < rhs.name;
@@ -90,6 +94,7 @@ private:
int clockPosY; // The y position of the clock, in pixels, from the bottom of the
// display (the clock is centred horizontally). -1 to disable the clock
String8 path;
+ String8 trimData;
SortedVector<Frame> frames;
bool playUntilComplete;
float backgroundColor[3];