graphicscomposition/openwfcompositionengine/common/include/owfattributes.h
branchRCL_3
changeset 163 bbf46f59e123
parent 0 5d03bc08d59c
child 164 25ffed67c7ef
equal deleted inserted replaced
150:57c618273d5c 163:bbf46f59e123
     1 /* Copyright (c) 2009 The Khronos Group Inc.
     1 /* Copyright (c) 2009 The Khronos Group Inc.
       
     2  * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
     2  *
     3  *
     3  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * copy of this software and/or associated documentation files (the
     5  * copy of this software and/or associated documentation files (the
     5  * "Materials"), to deal in the Materials without restriction, including
     6  * "Materials"), to deal in the Materials without restriction, including
     6  * without limitation the rights to use, copy, modify, merge, publish,
     7  * without limitation the rights to use, copy, modify, merge, publish,
    46 #define MAX_ATTR_LENGTH     (1 << ATTR_LENGTH_BITS)-1
    47 #define MAX_ATTR_LENGTH     (1 << ATTR_LENGTH_BITS)-1
    47 #define NUM_ATTR_VALUE_COPIES 3
    48 #define NUM_ATTR_VALUE_COPIES 3
    48 #define COMMITTED_ATTR_VALUE_INDEX 0
    49 #define COMMITTED_ATTR_VALUE_INDEX 0
    49 #define WORKING_ATTR_VALUE_INDEX 1
    50 #define WORKING_ATTR_VALUE_INDEX 1
    50 #define SNAPSHOT_ATTR_VALUE_INDEX 2
    51 #define SNAPSHOT_ATTR_VALUE_INDEX 2
       
    52 #define COMMIT_ATTR_DIRECT_FROM_WORKING -1
    51 
    53 
    52 typedef enum {
    54 typedef enum {
    53     ATTR_ERROR_NONE             = 0,
    55     ATTR_ERROR_NONE             = 0,
    54     ATTR_ERROR_NOT_FOUND        = -1,
    56     ATTR_ERROR_NOT_FOUND        = -1,
    55     ATTR_ERROR_ALREADY_IN_USE   = -2,
    57     ATTR_ERROR_ALREADY_IN_USE   = -2,
    85 typedef struct {
    87 typedef struct {
    86     OWFuint                 type: 2;
    88     OWFuint                 type: 2;
    87     OWFuint                 dirty: 1;
    89     OWFuint                 dirty: 1;
    88     OWFuint                 dirtysnapshot: 1;
    90     OWFuint                 dirtysnapshot: 1;
    89     OWFuint                 readonly: 1;
    91     OWFuint                 readonly: 1;
    90     OWFuint                 size;                       //Size of one primitive
    92     OWFuint                 size;                       /* Size of one primitive */
    91     OWFuint                 length: ATTR_LENGTH_BITS;   //Number of primitives in vector
    93     OWFuint                 length: ATTR_LENGTH_BITS;   /* Number of primitives in vector */
    92 } OWF_ATTRIBUTE_INFO;
    94 } OWF_ATTRIBUTE_INFO;
    93 
    95 
    94 /*
    96 /*
    95  * Attribute may be a scalar (1-element) or vector (n-element),
    97  * Attribute may be a scalar (1-element) or vector (n-element),
    96  * containing a reference to either integer, boolean or float value(s).
    98  * containing a reference to either integer, boolean or float value(s).