return ret;
ctx->dst = dst_srf;
- renderer_bind_destination(ctx, ctx->srf, ctx->srf->width,
- ctx->srf->height);
+ renderer_bind_destination(ctx, ctx->srf);
ret = bind_composite_blend_state(ctx, comp);
if (ret != XA_ERR_NONE)
{
unsigned vs_traits, fs_traits;
struct xa_shader shader;
- int width, height;
int ret;
ret = xa_ctx_srf_create(ctx, dst);
ctx->has_solid_color = 1;
ctx->dst = dst;
- width = ctx->srf->width;
- height = ctx->srf->height;
#if 0
debug_printf("Color Pixel=(%d, %d, %d, %d), RGBA=(%f, %f, %f, %f)\n",
vs_traits = VS_SOLID_FILL;
fs_traits = FS_SOLID_FILL;
- renderer_bind_destination(ctx, ctx->srf, width, height);
+ renderer_bind_destination(ctx, ctx->srf);
bind_solid_blend_state(ctx);
cso_set_samplers(ctx->cso, PIPE_SHADER_FRAGMENT, 0, NULL);
cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 0, NULL);
struct xa_surface *srf[]);
void renderer_bind_destination(struct xa_context *r,
- struct pipe_surface *surface, int width,
- int height);
+ struct pipe_surface *surface);
void renderer_init_state(struct xa_context *r);
void renderer_copy_prepare(struct xa_context *r,
*/
void
renderer_bind_destination(struct xa_context *r,
- struct pipe_surface *surface, int width, int height)
+ struct pipe_surface *surface)
{
+ int width = surface->width;
+ int height = surface->height;
struct pipe_framebuffer_state fb;
struct pipe_viewport_state viewport;
PIPE_BIND_RENDER_TARGET));
(void)screen;
- renderer_bind_destination(r, dst_surface,
- dst_surface->width, dst_surface->height);
+ renderer_bind_destination(r, dst_surface);
/* set misc state we care about */
{
if (ret != XA_ERR_NONE)
return -XA_ERR_NORES;
- renderer_bind_destination(r, r->srf, r->srf->width, r->srf->height);
+ renderer_bind_destination(r, r->srf);
xa_yuv_bind_blend_state(r);
xa_yuv_bind_shaders(r);
xa_yuv_bind_samplers(r, yuv);