Lines Matching defs:source
4 // Use of this source code is governed by a MIT-style
317 * @brief Copy pixels from source to dest.
321 void gfx_surface_blend(struct gfx_surface* target, struct gfx_surface* source, uint destx, uint desty) {
322 DEBUG_ASSERT(target->format == source->format);
324 LTRACEF("target %p, source %p, destx %u, desty %u\n", target, source, destx, desty);
331 uint width = source->width;
335 uint height = source->height;
340 if (source->format == ZX_PIXEL_FORMAT_RGB_565 && target->format == ZX_PIXEL_FORMAT_RGB_565) {
342 const uint16_t* src = static_cast<const uint16_t*>(source->ptr);
345 uint source_stride_diff = source->stride - width;
359 } else if (source->format == ZX_PIXEL_FORMAT_ARGB_8888 && target->format == ZX_PIXEL_FORMAT_ARGB_8888) {
361 const uint32_t* src = static_cast<const uint32_t*>(source->ptr);
364 uint source_stride_diff = source->stride - width;
379 } else if (source->format == ZX_PIXEL_FORMAT_RGB_x888 && target->format == ZX_PIXEL_FORMAT_RGB_x888) {
381 const uint32_t* src = static_cast<const uint32_t*>(source->ptr);
384 uint source_stride_diff = source->stride - width;
398 } else if (source->format == ZX_PIXEL_FORMAT_MONO_8 && target->format == ZX_PIXEL_FORMAT_MONO_8) {
400 const uint8_t* src = static_cast<const uint8_t*>(source->ptr);
403 uint source_stride_diff = source->stride - width;
418 panic("gfx_surface_blend: unimplemented colorspace combination (source %u target %u)\n", source->format, target->format);