Changeset 95935 in webkit


Ignore:
Timestamp:
Sep 25, 2011 11:53:14 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Move GtkWidgetBackingStoreCairo to the cairo directory and modify to use in the EFL.
https://bugs.webkit.org/show_bug.cgi?id=63502

Patch by Eunmi Lee <eunmi15.lee@samsung.com> on 2011-09-25
Reviewed by Martin Robinson.

The gtk/GtkWidgetBackingStoreCairo.cpp is moved to the cairo/WidgetBackingStoreCairo.cpp and
some codes for EFL are added.
WidgetBackingStoreCairo creates cairo_image_surface and has a role to copy reusable area
when scrolling. So, it will be used in the WebKit2 EFL port's BackingStore.

  • CMakeListsEfl.txt:
  • GNUmakefile.list.am:
  • platform/cairo/WidgetBackingStore.h:
  • platform/cairo/WidgetBackingStoreCairo.cpp: Renamed from Source/WebCore/platform/gtk/GtkWidgetBackingStoreCairo.cpp.

(WebCore::createSurfaceForBackingStore):
(WebCore::WidgetBackingStorePrivate::create):
(WebCore::WidgetBackingStorePrivate::WidgetBackingStorePrivate):
(WebCore::WidgetBackingStore::create):
(WebCore::WidgetBackingStore::WidgetBackingStore):
(WebCore::WidgetBackingStore::~WidgetBackingStore):
(WebCore::WidgetBackingStore::cairoSurface):
(WebCore::WidgetBackingStore::scroll):

  • platform/gtk/GtkWidgetBackingStoreX11.cpp:
Location:
trunk/Source/WebCore
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeListsEfl.txt

    r95437 r95935  
    8383IF (WTF_USE_CAIRO)
    8484  LIST(APPEND WebCore_INCLUDE_DIRECTORIES
     85    "${WEBCORE_DIR}/platform/cairo"
    8586    "${WEBCORE_DIR}/platform/graphics/cairo"
    8687  )
    8788  LIST(APPEND WebCore_SOURCES
     89    platform/cairo/WidgetBackingStoreCairo.cpp
    8890    platform/graphics/cairo/CairoUtilities.cpp
    8991    platform/graphics/cairo/FontCairo.cpp
  • trunk/Source/WebCore/ChangeLog

    r95934 r95935  
     12011-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
    1272011-09-25  Adam Barth  <abarth@webkit.org>
    228
  • trunk/Source/WebCore/GNUmakefile.list.am

    r95920 r95935  
    39893989        Source/WebCore/platform/gtk/GtkUtilities.cpp \
    39903990        Source/WebCore/platform/gtk/GtkUtilities.h \
    3991         Source/WebCore/platform/gtk/GtkWidgetBackingStoreCairo.cpp \
    3992         Source/WebCore/platform/gtk/GtkWidgetBackingStoreX11.cpp \
    39933991        Source/WebCore/platform/gtk/GeolocationServiceGtk.cpp \
    39943992        Source/WebCore/platform/gtk/GeolocationServiceGtk.h \
     
    40404038if TARGET_X11
    40414039webcoregtk_sources += \
     4040        Source/WebCore/platform/gtk/GtkWidgetBackingStoreX11.cpp \
    40424041        Source/WebCore/plugins/gtk/gtk2xtbin.c \
    40434042        Source/WebCore/plugins/gtk/gtk2xtbin.h \
     
    40494048        Source/WebCore/platform/ScrollAnimatorWin.cpp \
    40504049        Source/WebCore/platform/ScrollAnimatorWin.h \
     4050        Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp \
    40514051        Source/WebCore/platform/win/SystemInfo.cpp \
    40524052        Source/WebCore/platform/win/SystemInfo.h \
  • trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h

    r95901 r95935  
    2828#if PLATFORM(GTK)
    2929#include <gtk/gtk.h>
     30#elif PLATFORM(EFL)
     31#include <Evas.h>
    3032#endif
    3133
     
    3638#if PLATFORM(GTK)
    3739typedef GtkWidget* PlatformWidget;
     40#elif PLATFORM(EFL)
     41typedef Evas_Object* PlatformWidget;
    3842#endif
    3943
  • trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp

    r95934 r95935  
    11/*
    22 * Copyright (C) 2011, Igalia S.L.
     3 * Copyright (C) 2011 Samsung Electronics
    34 *
    45 *  This library is free software; you can redistribute it and/or
     
    2021#include "WidgetBackingStore.h"
    2122
    22 #ifndef XP_UNIX
    23 
    2423#include "CairoUtilities.h"
    2524#include "RefPtrCairo.h"
    2625#include <cairo/cairo.h>
    2726
     27#if PLATFORM(GTK)
     28#include "GtkVersioning.h"
     29#endif
     30
    2831namespace WebCore {
    2932
    30 static PassRefPtr<cairo_surface_t> createSurfaceForBackingStore(GtkWidget* widget, const IntSize& size)
     33static PassRefPtr<cairo_surface_t> createSurfaceForBackingStore(PlatformWidget widget, const IntSize& size)
    3134{
     35#if PLATFORM(GTK)
    3236    return gdk_window_create_similar_surface(gtk_widget_get_window(widget),
    3337                                             CAIRO_CONTENT_COLOR_ALPHA,
    3438                                             size.width(), size.height());
     39#else
     40    return adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, size.width(), size.height()));
     41#endif
    3542}
    36 
    3743
    3844class WidgetBackingStorePrivate {
     
    4450    RefPtr<cairo_surface_t> m_scrollSurface;
    4551
    46     static PassOwnPtr<WidgetBackingStorePrivate> create(GtkWidget* widget, const IntSize& size)
     52    static PassOwnPtr<WidgetBackingStorePrivate> create(PlatformWidget widget, const IntSize& size)
    4753    {
    4854        return adoptPtr(new WidgetBackingStorePrivate(widget, size));
     
    5359    // scrolling performance since we do not have to keep reallocating a memory region during
    5460    // quick scrolling requests.
    55     WidgetBackingStorePrivate(GtkWidget* widget, const IntSize& size)
     61    WidgetBackingStorePrivate(PlatformWidget widget, const IntSize& size)
    5662        : m_surface(createSurfaceForBackingStore(widget, size))
    5763        , m_scrollSurface(createSurfaceForBackingStore(widget, size))
     
    6066};
    6167
    62 PassOwnPtr<WidgetBackingStore> WidgetBackingStore::create(GtkWidget* widget, const IntSize& size)
     68PassOwnPtr<WidgetBackingStore> WidgetBackingStore::create(PlatformWidget widget, const IntSize& size)
    6369{
    6470    return adoptPtr(new WidgetBackingStore(widget, size));
    6571}
    6672
    67 WidgetBackingStore::WidgetBackingStore(GtkWidget* widget, const IntSize& size)
     73WidgetBackingStore::WidgetBackingStore(PlatformWidget widget, const IntSize& size)
    6874    : m_private(WidgetBackingStorePrivate::create(widget, size))
    6975{
     
    95101
    96102} // namespace WebCore
    97 
    98 #endif // !XP_UNIX
  • trunk/Source/WebCore/platform/gtk/GtkWidgetBackingStoreX11.cpp

    r95901 r95935  
    1919#include "config.h"
    2020#include "WidgetBackingStore.h"
    21 
    22 #ifdef XP_UNIX
    2321
    2422#include "GtkVersioning.h"
     
    108106
    109107} // namespace WebCore
    110 
    111 #endif // XP_UNIX
Note: See TracChangeset for help on using the changeset viewer.