summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-07-05 11:15:20 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-07-18 16:46:48 -0400
commit862e3890f54aaeb8589a6ee4c146f1fb50556004 (patch)
tree5aa4dc9d5df864a453b1fbdcb9b6d8b19db5518d /tests/Makefile.am
parent882f16d6e4dcca3aba53e1fbbe051e556d1c6390 (diff)
downloadgdk-pixbuf-862e3890f54aaeb8589a6ee4c146f1fb50556004.tar.gz
Add _new_from_bytes() and _read_pixels() API, handle read-only pixbufs
GdkPixbuf is an old API that predates introspection and GBytes. It has some confusion around whether or not pixbuf data is mutable or not. The _new_from_data() API takes a *const* pointer, but it's not copied, and _get_pixels() returns a non-const copy of the same pointer. There are several cases where we get read-only data, such as a GResource. For language bindings, _new_from_data() doesn't work because the array may be a temporary copy only allocated for the call. In order to support a clean _new_from_bytes() API, we need to add the concept of a read-only pixbuf into the core. The fundamental hack here is that _get_pixels() now causes an implicit copy. For the cases where we don't want to copy, add a new gdk_pixbuf_read_pixels() that returns a proper const pointer. https://bugzilla.gnome.org/show_bug.cgi?id=732297
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 80840c2ad..1c1787724 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,6 +32,7 @@ test_programs = \
pixbuf-resource \
pixbuf-scale \
pixbuf-save \
+ pixbuf-readonly-to-mutable \
$(NULL)
dist_installed_test_data = \
@@ -78,6 +79,12 @@ pixbuf_save_SOURCES = \
test-common.h \
$(NULL)
+pixbuf_readonly_to_mutable_SOURCES = \
+ pixbuf-readonly-to-mutable.c \
+ test-common.c \
+ test-common.h \
+ $(NULL)
+
pixbuf_resource_SOURCES = \
pixbuf-resource.c \
test-common.c \