Sunshine master
Self-hosted game stream host for Moonlight.
display_ram.cpp File Reference

Definitions for handling ram. More...

#include "display.h"
#include "misc.h"
#include "src/logging.h"
Include dependency graph for display_ram.cpp:

Classes

struct  platf::dxgi::img_t
 Captured frame buffer shared between capture and encode stages. More...
 

Functions

void platf::dxgi::apply_color_alpha (int *img_pixel_p, int cursor_pixel)
 Alpha-blend a color cursor pixel into a captured RAM frame.
 
void platf::dxgi::apply_color_masked (int *img_pixel_p, int cursor_pixel)
 Apply a masked-color cursor pixel into a captured RAM frame.
 
void platf::dxgi::blend_cursor (const cursor_t &cursor, img_t &img)
 Blend the current cursor image into a RAM frame.
 
void platf::dxgi::blend_cursor_color (const cursor_t &cursor, img_t &img, const bool masked)
 Blend a color cursor shape into a RAM frame.
 
void platf::dxgi::blend_cursor_monochrome (const cursor_t &cursor, img_t &img)
 Blend a monochrome cursor shape into a RAM frame.
 

Detailed Description

Definitions for handling ram.

Function Documentation

◆ apply_color_alpha()

void platf::dxgi::apply_color_alpha ( int * img_pixel_p,
int cursor_pixel )

Alpha-blend a color cursor pixel into a captured RAM frame.

Parameters
img_pixel_pPixel in the destination frame.
cursor_pixelARGB cursor pixel to blend.

◆ apply_color_masked()

void platf::dxgi::apply_color_masked ( int * img_pixel_p,
int cursor_pixel )

Apply a masked-color cursor pixel into a captured RAM frame.

Parameters
img_pixel_pPixel in the destination frame.
cursor_pixelARGB cursor pixel with masked-cursor semantics.

◆ blend_cursor()

void platf::dxgi::blend_cursor ( const cursor_t & cursor,
img_t & img )

Blend the current cursor image into a RAM frame.

Parameters
cursorCursor image or visibility state to composite.
imgImage or frame object to read from or populate.

◆ blend_cursor_color()

void platf::dxgi::blend_cursor_color ( const cursor_t & cursor,
img_t & img,
const bool masked )

Blend a color cursor shape into a RAM frame.

Parameters
cursorCursor image or visibility state to composite.
imgImage or frame object to read from or populate.
maskedWhether the cursor image uses an AND/XOR mask.

◆ blend_cursor_monochrome()

void platf::dxgi::blend_cursor_monochrome ( const cursor_t & cursor,
img_t & img )

Blend a monochrome cursor shape into a RAM frame.

Parameters
cursorCursor image or visibility state to composite.
imgImage or frame object to read from or populate.