Changeset 206045 in webkit
- Timestamp:
- Sep 16, 2016 1:46:58 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r206040 r206045 1 2016-09-15 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 3 [GTK] Surface created for glReadPixels path on Wayland is bigger than needed 4 https://bugs.webkit.org/show_bug.cgi?id=162025 5 6 Reviewed by Carlos Garcia Campos. 7 8 * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: 9 (WebKit::AcceleratedBackingStoreWayland::paint): the texture created by the Wayland 10 compositor is already scaled, so scaling its size when creating the surface causes it 11 to end up bigger than necessary. 12 1 13 2016-09-16 David Kilzer <ddkilzer@apple.com> 2 14 -
trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp
r205452 r206045 76 76 gdk_cairo_draw_from_gl(cr, gtk_widget_get_window(m_webPage.viewWidget()), texture, GL_TEXTURE, 1, clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height()); 77 77 #else 78 IntSize size = textureSize; 79 float deviceScaleFactor = m_webPage.deviceScaleFactor(); 80 size.scale(deviceScaleFactor); 78 if (!m_surface || cairo_image_surface_get_width(m_surface.get()) != textureSize.width() || cairo_image_surface_get_height(m_surface.get()) != textureSize.height()) 79 m_surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, textureSize.width(), textureSize.height())); 81 80 82 if (!m_surface || cairo_image_surface_get_width(m_surface.get()) != size.width() || cairo_image_surface_get_height(m_surface.get()) != size.height()) 83 m_surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, size.width(), size.height())); 84 cairoSurfaceSetDeviceScale(m_surface.get(), deviceScaleFactor, deviceScaleFactor); 81 cairoSurfaceSetDeviceScale(m_surface.get(), m_webPage.deviceScaleFactor(), m_webPage.deviceScaleFactor()); 85 82 86 83 GLuint fb; … … 104 101 105 102 // Convert to BGRA. 106 int totalBytes = size.width() * size.height() * 4;103 int totalBytes = textureSize.width() * textureSize.height() * 4; 107 104 for (int i = 0; i < totalBytes; i += 4) 108 105 std::swap(data[i], data[i + 2]);
Note: See TracChangeset
for help on using the changeset viewer.