mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-02 13:08:10 +02:00
Warnings cleanup for CAIRO_FORMAT_INVALID.
A few more fixes required case statements to handle the addition of CAIRO_FORMAT_INVALID.
This commit is contained in:
parent
1a7ba1a806
commit
e8c819c522
7 changed files with 12 additions and 0 deletions
|
|
@ -300,6 +300,8 @@ static QImage::Format
|
|||
_qimage_format_from_cairo_format (cairo_format_t fmt)
|
||||
{
|
||||
switch (fmt) {
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
ASSERT_NOT_REACHED;
|
||||
case CAIRO_FORMAT_ARGB32:
|
||||
return QImage::Format_ARGB32_Premultiplied;
|
||||
case CAIRO_FORMAT_RGB24:
|
||||
|
|
|
|||
|
|
@ -1537,6 +1537,7 @@ i915_surface_create_for_name (cairo_drm_device_t *base_dev,
|
|||
|
||||
switch (format) {
|
||||
default:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
case CAIRO_FORMAT_A1:
|
||||
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
|
||||
case CAIRO_FORMAT_ARGB32:
|
||||
|
|
@ -1686,6 +1687,7 @@ i915_surface_create_from_cacheable_image_internal (i915_device_t *device,
|
|||
format = CAIRO_FORMAT_A8;
|
||||
bpp = 1;
|
||||
break;
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
default:
|
||||
ASSERT_NOT_REACHED;
|
||||
status = _cairo_error (CAIRO_STATUS_INVALID_FORMAT);
|
||||
|
|
|
|||
|
|
@ -2076,6 +2076,7 @@ i965_get_card_format (cairo_format_t format)
|
|||
case CAIRO_FORMAT_A8:
|
||||
return BRW_SURFACEFORMAT_A8_UNORM;
|
||||
case CAIRO_FORMAT_A1:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
default:
|
||||
ASSERT_NOT_REACHED;
|
||||
return 0;
|
||||
|
|
@ -2092,6 +2093,7 @@ i965_get_dest_format (cairo_format_t format)
|
|||
case CAIRO_FORMAT_A8:
|
||||
return BRW_SURFACEFORMAT_A8_UNORM;
|
||||
case CAIRO_FORMAT_A1:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
default:
|
||||
ASSERT_NOT_REACHED;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1627,6 +1627,7 @@ i965_surface_create_for_name (cairo_drm_device_t *base_dev,
|
|||
case CAIRO_FORMAT_A8:
|
||||
content = CAIRO_CONTENT_ALPHA;
|
||||
break;
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
default:
|
||||
case CAIRO_FORMAT_A1:
|
||||
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@ intel_surface_create_for_name (cairo_drm_device_t *device,
|
|||
cairo_status_t status;
|
||||
|
||||
switch (format) {
|
||||
default:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
case CAIRO_FORMAT_A1:
|
||||
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
|
||||
|
|
|
|||
|
|
@ -726,6 +726,7 @@ intel_bo_put_image (intel_device_t *dev,
|
|||
width, height,
|
||||
dst_x, dst_y);
|
||||
default:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
return _cairo_error (CAIRO_STATUS_INVALID_FORMAT);
|
||||
}
|
||||
|
||||
|
|
@ -1028,6 +1029,7 @@ intel_glyph_cache_add_glyph (intel_device_t *device,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
ASSERT_NOT_REACHED;
|
||||
return _cairo_error (CAIRO_STATUS_INVALID_FORMAT);
|
||||
}
|
||||
|
|
@ -1114,6 +1116,7 @@ intel_get_glyph_cache (intel_device_t *device,
|
|||
format = CAIRO_FORMAT_A8;
|
||||
break;
|
||||
default:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
ASSERT_NOT_REACHED;
|
||||
return _cairo_error (CAIRO_STATUS_INVALID_FORMAT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -367,6 +367,7 @@ radeon_surface_create_for_name (cairo_drm_device_t *device,
|
|||
cairo_content_t content;
|
||||
|
||||
switch (format) {
|
||||
default:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
case CAIRO_FORMAT_A1:
|
||||
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue