Skip to content

Commit

Permalink
Use opaque color in dummy video
Browse files Browse the repository at this point in the history
Fix dummy video rendered as transparent on Wayland
  • Loading branch information
wangqr committed Apr 17, 2021
1 parent c3838c6 commit a02ce9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video_provider_dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ DummyVideoProvider::DummyVideoProvider(double fps, int frames, int width, int he
auto dst = interleaved_view(width, height, (bgra8_pixel_t*)data.data(), 4 * width);

bgra8_pixel_t colors[2] = {
bgra8_pixel_t(blue, green, red, 0),
bgra8_pixel_t(blue, green, red, 0)
bgra8_pixel_t(blue, green, red, 0xff),
bgra8_pixel_t(blue, green, red, 0xff)
};

if (pattern) {
Expand All @@ -78,7 +78,7 @@ DummyVideoProvider::DummyVideoProvider(double fps, int frames, int width, int he
l += 24;
if (l < 24) l -= 48;
hsl_to_rgb(h, s, l, &red, &blue, &green);
colors[1] = bgra8_pixel_t(blue, green, red, 0);
colors[1] = bgra8_pixel_t(blue, green, red, 0xff);

// Divide into a 8x8 grid and use light colours when row % 2 != col % 2
auto out = dst.begin();
Expand Down

0 comments on commit a02ce9e

Please sign in to comment.