diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-02-13 12:56:46 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-02-13 13:08:24 +0000 |
commit | adaf70a93f4449e85997bcde531b76c9044758ea (patch) | |
tree | 837fb1636b2f7b1ca8a4abf013c383b94f2c1070 /src/cairo-surface-private.h | |
parent | 2280de9d0282a599309ec12dc576bae54857f873 (diff) |
[surface] Separate the mime-data from the user-data.
Move the mime-data into its own array so that it cannot be confused with
user-data and we do not need to hard-code the copy list during
snapshotting. The copy-on-snapshotting code becomes far simpler and will
accommodate all future mime-types.
Keeping mime-data separate from user-data is important due to the
principle of least surprise - the API is different and so it would be
surprising if you queried for user-data and were returned an opaque
mime-data pointer, and vice versa. (Note this should have been prevented
by using interned strings, but conceptually it is cleaner to make the
separation.) Also it aides in trimming the user data arrays which are
linearly searched.
Based on the original patch by Adrian Johnson:
http://cgit.freedesktop.org/~ajohnson/cairo/commit/?h=metadata&id=37e607cc777523ad12a2d214708d79ecbca5b380
Diffstat (limited to 'src/cairo-surface-private.h')
-rw-r--r-- | src/cairo-surface-private.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cairo-surface-private.h b/src/cairo-surface-private.h index efd4365eb..12b38f015 100644 --- a/src/cairo-surface-private.h +++ b/src/cairo-surface-private.h @@ -57,6 +57,7 @@ struct _cairo_surface { cairo_status_t status; cairo_bool_t finished; cairo_user_data_array_t user_data; + cairo_user_data_array_t mime_data; cairo_matrix_t device_transform; cairo_matrix_t device_transform_inverse; |