|
Lines 218-231
bool WaylandCompositor::Surface::prepareTextureForPainting(unsigned& texture, In
a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp_sec1
|
| 218 |
return true; |
218 |
return true; |
| 219 |
} |
219 |
} |
| 220 |
|
220 |
|
| 221 |
bool WaylandCompositor::Surface::commit() |
221 |
void WaylandCompositor::Surface::commit() |
| 222 |
{ |
222 |
{ |
| 223 |
EGLDisplay eglDisplay = PlatformDisplay::sharedDisplay().eglDisplay(); |
223 |
EGLDisplay eglDisplay = PlatformDisplay::sharedDisplay().eglDisplay(); |
| 224 |
if (m_image != EGL_NO_IMAGE_KHR) |
224 |
if (m_image != EGL_NO_IMAGE_KHR) |
| 225 |
eglDestroyImage(eglDisplay, m_image); |
225 |
eglDestroyImage(eglDisplay, m_image); |
| 226 |
m_image = m_pendingBuffer->createImage(); |
226 |
m_image = m_pendingBuffer->createImage(); |
| 227 |
if (m_image == EGL_NO_IMAGE_KHR) |
227 |
if (m_image == EGL_NO_IMAGE_KHR) |
| 228 |
return false; |
228 |
return; |
| 229 |
|
229 |
|
| 230 |
makePendingBufferCurrent(); |
230 |
makePendingBufferCurrent(); |
| 231 |
if (m_webPage) |
231 |
if (m_webPage) |
|
Lines 240-247
bool WaylandCompositor::Surface::commit()
a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp_sec2
|
| 240 |
wl_callback_send_done(resource, 0); |
240 |
wl_callback_send_done(resource, 0); |
| 241 |
wl_resource_destroy(resource); |
241 |
wl_resource_destroy(resource); |
| 242 |
} |
242 |
} |
| 243 |
|
|
|
| 244 |
return true; |
| 245 |
} |
243 |
} |
| 246 |
|
244 |
|
| 247 |
static const struct wl_surface_interface surfaceInterface = { |
245 |
static const struct wl_surface_interface surfaceInterface = { |
|
Lines 288-296
static const struct wl_surface_interface surfaceInterface = {
a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp_sec3
|
| 288 |
auto* surface = static_cast<WaylandCompositor::Surface*>(wl_resource_get_user_data(resource)); |
286 |
auto* surface = static_cast<WaylandCompositor::Surface*>(wl_resource_get_user_data(resource)); |
| 289 |
if (!surface) |
287 |
if (!surface) |
| 290 |
return; |
288 |
return; |
| 291 |
|
289 |
surface->commit(); |
| 292 |
if (surface->commit()) |
|
|
| 293 |
wl_display_flush_clients(wl_client_get_display(client)); |
| 294 |
}, |
290 |
}, |
| 295 |
// setBufferTransformCallback |
291 |
// setBufferTransformCallback |
| 296 |
[](struct wl_client*, struct wl_resource*, int32_t) { }, |
292 |
[](struct wl_client*, struct wl_resource*, int32_t) { }, |