diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-15 18:22:06 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-28 18:49:16 +0100 |
commit | 26f963557bf065fd25b9c4f6652a252735a0fb74 (patch) | |
tree | 4abf06082de34b5d645e1d23a0191a06d2f26092 | |
parent | 97f8c20727eaeb2dfddb0d4796192cc042eb14fa (diff) |
drm/i915: Normalize spans opacity value
On the generic path I forgot to rescale the alpha value into [0,1].
-rw-r--r-- | src/drm/cairo-drm-i915-spans.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/drm/cairo-drm-i915-spans.c b/src/drm/cairo-drm-i915-spans.c index 6ede4cc4..3d32f498 100644 --- a/src/drm/cairo-drm-i915-spans.c +++ b/src/drm/cairo-drm-i915-spans.c @@ -249,6 +249,7 @@ i915_span_generic (i915_spans_t *spans, { double s, t; float *vertices; + float a = alpha / 255.; /* Each vertex is: * 2 vertex coordinates @@ -277,7 +278,7 @@ i915_span_generic (i915_spans_t *spans, *vertices++ = texcoord_2d_16 (s, t); break; } - *vertices++ = alpha; + *vertices++ = a; if (spans->need_clip_surface) { s = x1, t = y1; cairo_matrix_transform_point (&spans->shader.clip.base.matrix, &s, &t); @@ -307,7 +308,7 @@ i915_span_generic (i915_spans_t *spans, *vertices++ = texcoord_2d_16 (s, t); break; } - *vertices++ = alpha; + *vertices++ = a; if (spans->need_clip_surface) { s = x0, t = y1; cairo_matrix_transform_point (&spans->shader.clip.base.matrix, &s, &t); @@ -337,7 +338,7 @@ i915_span_generic (i915_spans_t *spans, *vertices++ = texcoord_2d_16 (s, t); break; } - *vertices++ = alpha; + *vertices++ = a; if (spans->need_clip_surface) { s = x0, t = y0; cairo_matrix_transform_point (&spans->shader.clip.base.matrix, &s, &t); |