New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wlr-screencopy-unstable-v1 support #1069

Merged
merged 9 commits into from Jun 30, 2018

Conversation

Projects
None yet
2 participants
@emersion
Copy link
Member

emersion commented Jun 19, 2018

See swaywm/wlr-protocols#17

  • Make use of the new flags to optimize (format, stride, inverted_y)
  • Capture regions of the screen

@emersion emersion force-pushed the emersion:screencopy branch from a1ca97c to 9eedcb0 Jun 22, 2018

output = wl_registry_bind(registry, name, &wl_output_interface, 1);
} else if (strcmp(interface, wl_shm_interface.name) == 0) {
shm = wl_registry_bind(registry, name, &wl_shm_interface, 1);
} else if (strcmp(interface, zwlr_screencopy_manager_v1_interface.name)

This comment has been minimized.

@ddevault

ddevault Jun 28, 2018

Member

Break this line up at the comma

}

POP_GLES2_DEBUG;

return true;
return (glGetError() == GL_NO_ERROR);

This comment has been minimized.

@ddevault

ddevault Jun 28, 2018

Member

Ditch the extra parens

@ddevault

This comment has been minimized.

Copy link
Member

ddevault commented Jun 28, 2018

Can we just use libpng directly instead of forking over to imagemagick?

@ddevault

This comment has been minimized.

Copy link
Member

ddevault commented Jun 28, 2018

libpng can handle all of the pixel formats you support here

emersion added some commits Jun 19, 2018

@emersion emersion force-pushed the emersion:screencopy branch from bb9d775 to 5465e03 Jun 30, 2018

@emersion emersion force-pushed the emersion:screencopy branch from 5465e03 to a7a96d7 Jun 30, 2018

@emersion emersion changed the title [WIP] Add wlr-screencopy-unstable-v1 support Add wlr-screencopy-unstable-v1 support Jun 30, 2018

@emersion

This comment has been minimized.

Copy link
Member

emersion commented Jun 30, 2018

Switched to libpng. This speeds up capture a lot.

@@ -0,0 +1,270 @@
/*
* Copyright © 2008 Kristian Høgsberg

This comment has been minimized.

@ddevault

ddevault Jun 30, 2018

Member

Who's this dude

This comment has been minimized.

@ddevault

ddevault Jun 30, 2018

Member

Right, I know who this dude is, but why is this file attributed to him

This comment has been minimized.

@emersion

emersion Jun 30, 2018

Member

This example has been mutated from what used to be sample code from him. I guess there's not a lot of code remaining from him? Probably just the create_shm_buffer function, which has been heavily modified.

This comment has been minimized.

@ddevault

ddevault Jun 30, 2018

Member

I mean, it's your code, you can assign the copyright to whoever you want

@ddevault

This comment has been minimized.

Copy link
Member

ddevault commented Jun 30, 2018

Switched to libpng. This speeds up capture a lot.

nice

@ddevault ddevault merged commit 015ebc5 into swaywm:master Jun 30, 2018

1 check passed

builds.sr.ht builds.sr.ht job completed successfully
Details

@emersion emersion deleted the emersion:screencopy branch Jun 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment