Changeset 69793 in webkit
- Timestamp:
- Oct 14, 2010 12:29:25 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r69791 r69793 1 2010-10-14 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Small cleanup in PluginViewGtk 6 https://bugs.webkit.org/show_bug.cgi?id=47588 7 8 Remove some dead code and use PlatformRefPtr for cairo surfaces. 9 10 No new tests, only refactoring. 11 12 * plugins/gtk/PluginViewGtk.cpp: 13 (WebCore::PluginView::paint): 14 1 15 2010-10-14 Dawit Alemayehu <adawit@kde.org> 2 16 -
trunk/WebCore/plugins/gtk/PluginViewGtk.cpp
r69344 r69793 194 194 exposedRect.move(-frameRect().x(), -frameRect().y()); 195 195 196 Window dummyW; 197 int dummyI; 198 unsigned int dummyUI, actualDepth = 0; 199 XGetGeometry(GDK_DISPLAY(), m_drawable, &dummyW, &dummyI, &dummyI, 200 &dummyUI, &dummyUI, &dummyUI, &actualDepth); 201 202 const unsigned int drawableDepth = ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth; 203 ASSERT(drawableDepth == actualDepth); 204 205 cairo_surface_t* drawableSurface = cairo_xlib_surface_create(GDK_DISPLAY(), 206 m_drawable, 207 m_visual, 208 m_windowRect.width(), 209 m_windowRect.height()); 196 PlatformRefPtr<cairo_surface_t> drawableSurface = adoptPlatformRef(cairo_xlib_surface_create(GDK_DISPLAY(), 197 m_drawable, 198 m_visual, 199 m_windowRect.width(), 200 m_windowRect.height())); 210 201 211 202 if (m_isTransparent) { … … 214 205 // we'd end up with junk in there from the last paint, or, worse, 215 206 // uninitialized data. 216 PlatformRefPtr<cairo_t> cr = adoptPlatformRef(cairo_create(drawableSurface ));217 218 if (!(cairo_surface_get_content(drawableSurface ) & CAIRO_CONTENT_ALPHA)) {207 PlatformRefPtr<cairo_t> cr = adoptPlatformRef(cairo_create(drawableSurface.get())); 208 209 if (!(cairo_surface_get_content(drawableSurface.get()) & CAIRO_CONTENT_ALPHA)) { 219 210 // Attempt to fake it when we don't have an alpha channel on our 220 211 // pixmap. If that's not possible, at least clear the window to … … 252 243 cairo_save(cr); 253 244 254 cairo_set_source_surface(cr, drawableSurface , frameRect().x(), frameRect().y());245 cairo_set_source_surface(cr, drawableSurface.get(), frameRect().x(), frameRect().y()); 255 246 256 247 cairo_rectangle(cr, … … 266 257 267 258 cairo_restore(cr); 268 cairo_surface_destroy(drawableSurface);269 259 #endif // defined(XP_UNIX) 270 260 }
Note: See TracChangeset
for help on using the changeset viewer.