[Spice-devel] [PATCH 13/15] worker: move shadow_new() and container_new()

Uri Lublin ulublin at redhat.com
Tue Nov 3 09:10:01 PST 2015


On 11/03/2015 06:27 PM, Fabiano FidĂȘncio wrote:
> On Tue, Nov 3, 2015 at 11:20 AM, Frediano Ziglio <fziglio at redhat.com> wrote:
>> From: Marc-André Lureau <marcandre.lureau at gmail.com>
>>

This patch does "move and modify"

>> ---
>>   server/red_worker.c | 61 ++++++++++++-----------------------------------------
>>   server/tree.c       | 39 ++++++++++++++++++++++++++++++++++
>>   server/tree.h       |  9 ++++++++
>>   3 files changed, 61 insertions(+), 48 deletions(-)
>>

>> diff --git a/server/tree.h b/server/tree.h
>> index e10fa1c..9ee6007 100644
>> --- a/server/tree.h
>> +++ b/server/tree.h
>> @@ -52,11 +52,17 @@ struct Shadow {
>>       DrawItem* owner;
>>   };
>>
>> +#define IS_SHADOW(item) ((item)->type == TREE_ITEM_TYPE_SHADOW)
>> +#define SHADOW(item) ((Container*)(item))

This should be ((Shadow*)(item))

Regards,
     Uri.

>> +
>>   struct Container {
>>       TreeItem base;
>>       Ring items;
>>   };
>>
>> +#define IS_CONTAINER(item) ((item)->type == TREE_ITEM_TYPE_CONTAINER)
>> +#define CONTAINER(item) ((Container*)(item))
>> +
>>   struct DrawItem {
>>       TreeItem base;
>>       uint8_t effect;
>> @@ -65,6 +71,7 @@ struct DrawItem {
>>   };
>>
>>   #define IS_DRAW_ITEM(item) ((item)->type == TREE_ITEM_TYPE_DRAWABLE)
>> +#define DRAW_ITEM(item) ((DrawItem*)(item))
>>
>>   typedef struct DependItem {
>>       Drawable *drawable;
>> @@ -101,5 +108,7 @@ struct Drawable {
>>   };
>>
>>   void       tree_item_dump                           (TreeItem *item);
>> +Shadow*    shadow_new                               (DrawItem *item, const SpicePoint *delta);
>> +Container* container_new                            (DrawItem *item);
>>
>>   #endif /* TREE_H_ */



More information about the Spice-devel mailing list