本文整理汇总了C++中Compositor::Composite方法的典型用法代码示例。如果您正苦于以下问题:C++ Compositor::Composite方法的具体用法?C++ Compositor::Composite怎么用?C++ Compositor::Composite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Compositor
的用法示例。
在下文中一共展示了Compositor::Composite方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoComposition
int GLWorker::DoComposition(Compositor &compositor, Work *work) {
int ret =
compositor.Composite(work->layers, work->num_layers, work->framebuffer);
int timeline_fd = work->timeline_fd;
work->timeline_fd = -1;
if (ret) {
worker_ret_ = ret;
glFinish();
sw_sync_timeline_inc(timeline_fd, work->num_layers);
close(timeline_fd);
return pthread_cond_signal(&work_done_cond_);
}
unsigned timeline_count = work->num_layers + 1;
worker_ret_ = sw_sync_fence_create(timeline_fd, "GLComposition done fence",
timeline_count);
ret = pthread_cond_signal(&work_done_cond_);
glFinish();
sw_sync_timeline_inc(timeline_fd, timeline_count);
close(timeline_fd);
return ret;
}