diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-26 19:41:38 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-03-26 19:43:06 +0200 |
commit | 353ad30b12e75bb56403ab524f18832e74aa94e2 (patch) | |
tree | b3c3ae9737d643f269d7592bda9cb6aa71b2ad8f | |
parent | e2ee2a6dab4034615a9647a2cef42ac038f2d481 (diff) | |
download | gtk+-353ad30b12e75bb56403ab524f18832e74aa94e2.tar.gz |
rendernode: Fix serializing
Adding the offset node broke serialization in 2 ways:
1. We store the enum value in the node, so make sure to not change it
for existing values
2. The offset node was missing in the deserialization lookup table
-rw-r--r-- | gsk/gskenums.h | 6 | ||||
-rw-r--r-- | gsk/gskrendernodeimpl.c | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/gsk/gskenums.h b/gsk/gskenums.h index 9835774152..11def6bd8e 100644 --- a/gsk/gskenums.h +++ b/gsk/gskenums.h @@ -35,7 +35,6 @@ * @GSK_INSET_SHADOW_NODE: A node drawing an inset shadow * @GSK_OUTSET_SHADOW_NODE: A node drawing an outset shadow * @GSK_TRANSFORM_NODE: A node that renders its child after applying a matrix transform - * @GSK_OFFSET_NODE: A node that renders its child after applying a 2D translation * @GSK_OPACITY_NODE: A node that changes the opacity of its child * @GSK_COLOR_MATRIX_NODE: A node that applies a color matrix to every pixel * @GSK_REPEAT_NODE: A node that repeats the child's contents @@ -46,6 +45,7 @@ * @GSK_CROSS_FADE_NODE: A node that cross-fades between two children * @GSK_TEXT_NODE: A node containing a glyph string * @GSK_BLUR_NODE: A node that applies a blur + * @GSK_OFFSET_NODE: A node that renders its child after applying a 2D translation * * The type of a node determines what the node is rendering. * @@ -63,7 +63,6 @@ typedef enum { GSK_INSET_SHADOW_NODE, GSK_OUTSET_SHADOW_NODE, GSK_TRANSFORM_NODE, - GSK_OFFSET_NODE, GSK_OPACITY_NODE, GSK_COLOR_MATRIX_NODE, GSK_REPEAT_NODE, @@ -73,7 +72,8 @@ typedef enum { GSK_BLEND_NODE, GSK_CROSS_FADE_NODE, GSK_TEXT_NODE, - GSK_BLUR_NODE + GSK_BLUR_NODE, + GSK_OFFSET_NODE } GskRenderNodeType; /** diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 347a4e1333..3a3a7d783c 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -4583,7 +4583,8 @@ static const GskRenderNodeClass *klasses[] = { [GSK_BLEND_NODE] = &GSK_BLEND_NODE_CLASS, [GSK_CROSS_FADE_NODE] = &GSK_CROSS_FADE_NODE_CLASS, [GSK_TEXT_NODE] = &GSK_TEXT_NODE_CLASS, - [GSK_BLUR_NODE] = &GSK_BLUR_NODE_CLASS + [GSK_BLUR_NODE] = &GSK_BLUR_NODE_CLASS, + [GSK_OFFSET_NODE] = &GSK_OFFSET_NODE_CLASS }; GskRenderNode * |