Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint`
Follow up of 12cb59be7d
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
IGT wants to add support for planes with a bit depth >10, which
requires a higher precision format than we have currently.
I'm using RGBA as format, because of its existence in OpenGL.
With the new formats we can directly convert our bytes to half float,
or multiply a colro vector with a matrix to go to the Y'CbCr colorspace.
This requires pixman 0.36.0, so bump the version requirement.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
All the cases are the same, except len is different.
Use the already calculated len parameter to handle all
cases except RGB24 the same.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Suggested-by: Bryce Harrington <bryce@bryceharrington.org>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
Run the command below suggested by geirha in ##sed@irc.freenode.net.
git grep -l 'http://.*gnome.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}gnome\.org\)|https\1|g'
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Run the command below suggested by geirha in ##sed@irc.freenode.net.
git grep -l 'http://.*freedesktop.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}freedesktop\.org\)|https\1|g'
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
If the bitmap's min is non-zero, _bitmap_next_id() could break out of
its loop early, before initializing the prev variable. prev would then
be dereferenced without a null ptr check. This condition should never
occur in practice, so add an assert() to assure it doesn't.
Same issue is present in trace.c.
Coverity IDs: #1159557, #1159558
Reviewed-By: Uli Schlachter <psychon@znc.in>
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
csi-trace does not show help string correctly, due to a bug in its
command line argument parsing. strcmp returns 0 when there is an exact
match, which means it requires an inverted test.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
On AIX, the token jmpbuf is a pre-processor macro.
cairo-script-scanner.c includes a private struct with a member named
jmpbuf which gets renamed to __jmpbuf when AIX's sys/context.h has been
included.
While judicious ordering of includes might kludge around this problem
(by causing all references to .jmpbuf to become .__jmpbuf), it's better
to simply select a new name for the struct member that won't suffer the
collision.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89339
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Use quoted includes rather than bracketed, to prefer linking to the
in-tree cairo in preference to the system cairo.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris wrote all of the cairo script stuff. I'm making a guess about the
copyright date.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Quells the following warning:
cairo-script-scanner.c: In function ‘_translate_string’:
cairo-script-scanner.c:1623:18: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (buf_len <= 8 + 2*string->len) {
^
The current code results in trace lines with the source surface being
pushed on the stack two times instead of one:
s1 s1 //ARGB32 48 48 similar-image % s2
Instead of:
s1 //ARGB32 48 48 similar-image % s2
This greatly confuses later commands when the script was replayed,
causing traces for trivial GTK3 programs to be unplayable, usually
yielding the following error:
"invalid value (typically too big) for the size of the input (surface, pattern, etc.)"
Drop the duplicated entry from the trace line printed by the
cairo_surface_create_similar_image() override.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73580
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
There are many more that can go, but these take the most bytes.
FC_CHARSET needs to go specially because I recently changed
its format in fontconfig. Ouch!
ARRAY_LENGTH macro is used in perf's cairo-perf.h, src's cairoint.h,
test's cairo-test.h and in some internal header files of util's
directory.So to maintain consistency ARRAY_SIZE is replaced with
ARRAY_LENGTH macro.
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
CSI_STATUS_SUCCESS is defined as equivalent to CAIRO_STATUS_SUCCESS.
We should prefer the former when comparing against csi_status_t
variables, else we'll get a warning:
cairo-script-interpreter.c:637:23: warning: comparison between
‘csi_status_t’ and ‘enum _cairo_status’ [-Wenum-compare]
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This quells the following warning:
warning: enumeration value ‘LZO’ not handled in switch [-Wswitch-enum]
The LZO enum value is defined and used elsewhere, even if lzo support
isn't available.
This situation might arise if cairo scripts were generated on one system
with lzo, and then replayed on a system without it. For now simply
error out if this occurs.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This error enum was added last September when JBIG2 support was added.
Support it as well in the tracing code. This fixes this warning:
trace.c:1544:5: warning: enumeration value
‘CAIRO_STATUS_JBIG2_GLOBAL_MISSING’ not handled in switch [-Wswitch]
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Recent updates (in the past couple of years) to firefox have exposed
numerous bugs in the way we emit the operands. A few off-by-ones,
missing surfaces and outright bugs all of which are intermixed into
producing a corrupt stack.
Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In particular fixing up a couple of corner cases in emitting the right
instructions for scaled-fonts and patterns.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
But note we can only do the exchange if they do indeed match and
there are no other references (the objects are only on the stack).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Try using the lighter-weight LZO decompressor in an effort to speed up
replays (at the cost of making the bound traces slightly larger).
Presuming that with the slight increase in file size (from -1% to +10%),
the file data remains in the readahead buffer cache, replays see a
performance improvement of between 5-10%.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
s/CAIRO_GOBJECT_TYPE_HNT_METRICS/CAIRO_GOBJECT_TYPE_HINT_METRICS/
However, as we have already released the broken headers, we need to
preserve that mistake in case applications are already using. Since it
is just a #define, there is little associated cost with carrying both
the incorrect spelling and the corrected define.
The idiom (and expectation) for surface operators is that it leaves the
surface on the stack for the next operation. Also we need to hold onto a
surface reference for objects put onto the stack, yet for the
map-to-image return we did not own one.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Adjust the stack manipulation to avoid moving an unknown surface to
the dictionary.
Reported-by: Dongyeon Kim <dy5.kim@samsung.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>