Changeset 95935 in webkit
- Timestamp:
- Sep 25, 2011 11:53:14 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeListsEfl.txt
r95437 r95935 83 83 IF (WTF_USE_CAIRO) 84 84 LIST(APPEND WebCore_INCLUDE_DIRECTORIES 85 "${WEBCORE_DIR}/platform/cairo" 85 86 "${WEBCORE_DIR}/platform/graphics/cairo" 86 87 ) 87 88 LIST(APPEND WebCore_SOURCES 89 platform/cairo/WidgetBackingStoreCairo.cpp 88 90 platform/graphics/cairo/CairoUtilities.cpp 89 91 platform/graphics/cairo/FontCairo.cpp -
trunk/Source/WebCore/ChangeLog
r95934 r95935 1 2011-09-25 Eunmi Lee <eunmi15.lee@samsung.com> 2 3 [EFL] Move GtkWidgetBackingStoreCairo to the cairo directory and modify to use in the EFL. 4 https://bugs.webkit.org/show_bug.cgi?id=63502 5 6 Reviewed by Martin Robinson. 7 8 The gtk/GtkWidgetBackingStoreCairo.cpp is moved to the cairo/WidgetBackingStoreCairo.cpp and 9 some codes for EFL are added. 10 WidgetBackingStoreCairo creates cairo_image_surface and has a role to copy reusable area 11 when scrolling. So, it will be used in the WebKit2 EFL port's BackingStore. 12 13 * CMakeListsEfl.txt: 14 * GNUmakefile.list.am: 15 * platform/cairo/WidgetBackingStore.h: 16 * platform/cairo/WidgetBackingStoreCairo.cpp: Renamed from Source/WebCore/platform/gtk/GtkWidgetBackingStoreCairo.cpp. 17 (WebCore::createSurfaceForBackingStore): 18 (WebCore::WidgetBackingStorePrivate::create): 19 (WebCore::WidgetBackingStorePrivate::WidgetBackingStorePrivate): 20 (WebCore::WidgetBackingStore::create): 21 (WebCore::WidgetBackingStore::WidgetBackingStore): 22 (WebCore::WidgetBackingStore::~WidgetBackingStore): 23 (WebCore::WidgetBackingStore::cairoSurface): 24 (WebCore::WidgetBackingStore::scroll): 25 * platform/gtk/GtkWidgetBackingStoreX11.cpp: 26 1 27 2011-09-25 Adam Barth <abarth@webkit.org> 2 28 -
trunk/Source/WebCore/GNUmakefile.list.am
r95920 r95935 3989 3989 Source/WebCore/platform/gtk/GtkUtilities.cpp \ 3990 3990 Source/WebCore/platform/gtk/GtkUtilities.h \ 3991 Source/WebCore/platform/gtk/GtkWidgetBackingStoreCairo.cpp \3992 Source/WebCore/platform/gtk/GtkWidgetBackingStoreX11.cpp \3993 3991 Source/WebCore/platform/gtk/GeolocationServiceGtk.cpp \ 3994 3992 Source/WebCore/platform/gtk/GeolocationServiceGtk.h \ … … 4040 4038 if TARGET_X11 4041 4039 webcoregtk_sources += \ 4040 Source/WebCore/platform/gtk/GtkWidgetBackingStoreX11.cpp \ 4042 4041 Source/WebCore/plugins/gtk/gtk2xtbin.c \ 4043 4042 Source/WebCore/plugins/gtk/gtk2xtbin.h \ … … 4049 4048 Source/WebCore/platform/ScrollAnimatorWin.cpp \ 4050 4049 Source/WebCore/platform/ScrollAnimatorWin.h \ 4050 Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp \ 4051 4051 Source/WebCore/platform/win/SystemInfo.cpp \ 4052 4052 Source/WebCore/platform/win/SystemInfo.h \ -
trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h
r95901 r95935 28 28 #if PLATFORM(GTK) 29 29 #include <gtk/gtk.h> 30 #elif PLATFORM(EFL) 31 #include <Evas.h> 30 32 #endif 31 33 … … 36 38 #if PLATFORM(GTK) 37 39 typedef GtkWidget* PlatformWidget; 40 #elif PLATFORM(EFL) 41 typedef Evas_Object* PlatformWidget; 38 42 #endif 39 43 -
trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp
r95934 r95935 1 1 /* 2 2 * Copyright (C) 2011, Igalia S.L. 3 * Copyright (C) 2011 Samsung Electronics 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 20 21 #include "WidgetBackingStore.h" 21 22 22 #ifndef XP_UNIX23 24 23 #include "CairoUtilities.h" 25 24 #include "RefPtrCairo.h" 26 25 #include <cairo/cairo.h> 27 26 27 #if PLATFORM(GTK) 28 #include "GtkVersioning.h" 29 #endif 30 28 31 namespace WebCore { 29 32 30 static PassRefPtr<cairo_surface_t> createSurfaceForBackingStore( GtkWidget*widget, const IntSize& size)33 static PassRefPtr<cairo_surface_t> createSurfaceForBackingStore(PlatformWidget widget, const IntSize& size) 31 34 { 35 #if PLATFORM(GTK) 32 36 return gdk_window_create_similar_surface(gtk_widget_get_window(widget), 33 37 CAIRO_CONTENT_COLOR_ALPHA, 34 38 size.width(), size.height()); 39 #else 40 return adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, size.width(), size.height())); 41 #endif 35 42 } 36 37 43 38 44 class WidgetBackingStorePrivate { … … 44 50 RefPtr<cairo_surface_t> m_scrollSurface; 45 51 46 static PassOwnPtr<WidgetBackingStorePrivate> create( GtkWidget*widget, const IntSize& size)52 static PassOwnPtr<WidgetBackingStorePrivate> create(PlatformWidget widget, const IntSize& size) 47 53 { 48 54 return adoptPtr(new WidgetBackingStorePrivate(widget, size)); … … 53 59 // scrolling performance since we do not have to keep reallocating a memory region during 54 60 // quick scrolling requests. 55 WidgetBackingStorePrivate( GtkWidget*widget, const IntSize& size)61 WidgetBackingStorePrivate(PlatformWidget widget, const IntSize& size) 56 62 : m_surface(createSurfaceForBackingStore(widget, size)) 57 63 , m_scrollSurface(createSurfaceForBackingStore(widget, size)) … … 60 66 }; 61 67 62 PassOwnPtr<WidgetBackingStore> WidgetBackingStore::create( GtkWidget*widget, const IntSize& size)68 PassOwnPtr<WidgetBackingStore> WidgetBackingStore::create(PlatformWidget widget, const IntSize& size) 63 69 { 64 70 return adoptPtr(new WidgetBackingStore(widget, size)); 65 71 } 66 72 67 WidgetBackingStore::WidgetBackingStore( GtkWidget*widget, const IntSize& size)73 WidgetBackingStore::WidgetBackingStore(PlatformWidget widget, const IntSize& size) 68 74 : m_private(WidgetBackingStorePrivate::create(widget, size)) 69 75 { … … 95 101 96 102 } // namespace WebCore 97 98 #endif // !XP_UNIX -
trunk/Source/WebCore/platform/gtk/GtkWidgetBackingStoreX11.cpp
r95901 r95935 19 19 #include "config.h" 20 20 #include "WidgetBackingStore.h" 21 22 #ifdef XP_UNIX23 21 24 22 #include "GtkVersioning.h" … … 108 106 109 107 } // namespace WebCore 110 111 #endif // XP_UNIX
Note: See TracChangeset
for help on using the changeset viewer.