[cairo-commit] src/cairo-qt-surface.cpp src/drm
Chris Wilson
ickle at kemper.freedesktop.org
Mon Mar 1 02:25:40 PST 2010
src/cairo-qt-surface.cpp | 2 ++
src/drm/cairo-drm-i915-surface.c | 2 ++
src/drm/cairo-drm-i965-shader.c | 2 ++
src/drm/cairo-drm-i965-surface.c | 1 +
src/drm/cairo-drm-intel-surface.c | 1 +
src/drm/cairo-drm-intel.c | 3 +++
src/drm/cairo-drm-radeon-surface.c | 1 +
7 files changed, 12 insertions(+)
New commits:
commit e8c819c5227d29dfdf503022339276eb725a3e97
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Mar 1 10:25:01 2010 +0000
Warnings cleanup for CAIRO_FORMAT_INVALID.
A few more fixes required case statements to handle the addition of
CAIRO_FORMAT_INVALID.
diff --git a/src/cairo-qt-surface.cpp b/src/cairo-qt-surface.cpp
index fed3a6a..5d263a9 100644
--- a/src/cairo-qt-surface.cpp
+++ b/src/cairo-qt-surface.cpp
@@ -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:
diff --git a/src/drm/cairo-drm-i915-surface.c b/src/drm/cairo-drm-i915-surface.c
index dabc02e..039497a 100644
--- a/src/drm/cairo-drm-i915-surface.c
+++ b/src/drm/cairo-drm-i915-surface.c
@@ -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);
diff --git a/src/drm/cairo-drm-i965-shader.c b/src/drm/cairo-drm-i965-shader.c
index c448d88..39c89a9 100644
--- a/src/drm/cairo-drm-i965-shader.c
+++ b/src/drm/cairo-drm-i965-shader.c
@@ -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;
diff --git a/src/drm/cairo-drm-i965-surface.c b/src/drm/cairo-drm-i965-surface.c
index 10331dd..273273d 100644
--- a/src/drm/cairo-drm-i965-surface.c
+++ b/src/drm/cairo-drm-i965-surface.c
@@ -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));
diff --git a/src/drm/cairo-drm-intel-surface.c b/src/drm/cairo-drm-intel-surface.c
index 965772d..7c07548 100644
--- a/src/drm/cairo-drm-intel-surface.c
+++ b/src/drm/cairo-drm-intel-surface.c
@@ -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));
diff --git a/src/drm/cairo-drm-intel.c b/src/drm/cairo-drm-intel.c
index dd5883a..c530a08 100644
--- a/src/drm/cairo-drm-intel.c
+++ b/src/drm/cairo-drm-intel.c
@@ -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);
}
diff --git a/src/drm/cairo-drm-radeon-surface.c b/src/drm/cairo-drm-radeon-surface.c
index e43a975..08db8f0 100644
--- a/src/drm/cairo-drm-radeon-surface.c
+++ b/src/drm/cairo-drm-radeon-surface.c
@@ -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));
More information about the cairo-commit
mailing list