[Webkit-unassigned] [Bug 63502] [EFL] Move GtkWidgetBackingStoreCairo to the cairo directory and modify to use in the EFL.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 22 20:45:07 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=63502





--- Comment #27 from EunMi Lee <eunmi15.lee at samsung.com>  2011-09-22 20:45:05 PST ---
(In reply to comment #23)
> (From update of attachment 108266 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=108266&action=review
> 

Thank you for your detailed comments!
Now, I've moved every duplicated codes to the WidgetBackingStoreCairo.

> There's more code to share here. I really meant it when I said 99% of the files were equal. The only difference between EflWidgetBackingStoreCairo and GtkWidgetBackingStoreCairo is that the former uses cairo_image_surface_create and the latter uses gdk_window_create_similar_surface to set WidgetBackingStorePrivate::{m_surface,m_scrollSurface}.
> 
> Please try to factor out even more common code.
> 
> > Source/WebCore/ChangeLog:20
> > +        * platform/cairo/WidgetBackingStoreCairo.cpp: Added.
> 
> To me, it makes more sense to name it WidgetBackingStore.cpp to match its header.

I think it is better to use WidgetBackingStoreCairo.cpp in order to distinguish with GtkWidgetBackingStoreX11.cpp. Both of them use WidgetBackingStore.h.

> 
> > Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp:39
> > +    targetRect.setWidth(std::max(0, targetRect.width() - scrollOffset.width()));
> 
> targetRect.shiftMaxXEdgeTo() looks cleaner -- Eric's question in comment #8 was really a question, not a request for you to change the code.
> 
> > Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp:40
> > +    targetRect.setHeight(std::max(0, targetRect.height() - scrollOffset.height()));
> 
> Ditto.
>

There was a misunderstanding because of my limited English.
So, I leaved shiftMaxXEdgeTo for readability.

> > Source/WebCore/platform/efl/EflWidgetBackingStoreCairo.cpp:44
> > +    WidgetBackingStorePrivate(const IntSize& size)
> 
> I prefer gtk's approach of setting m_surface and m_scrollSurface in the initialization list.
> 

I integrated with gtk's approach.

> > Source/WebCore/platform/efl/EflWidgetBackingStoreCairo.cpp:53
> > +WidgetBackingStore::WidgetBackingStore(Evas_Object* widget, const IntSize& size)
> 
> widget is not being used, and its type should be PlatformWidget.
> 
> > Source/WebCore/platform/efl/EflWidgetBackingStoreCairo.cpp:62
> > +cairo_surface_t* WidgetBackingStore::cairoSurface()
> 
> This is common code.
> 
> > Source/WebCore/platform/efl/EflWidgetBackingStoreCairo.cpp:67
> > +void WidgetBackingStore::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
> 
> This is common code.
> 

All common codes have been integrated.

> > Source/WebCore/platform/gtk/GtkWidgetBackingStoreCairo.cpp:62
> >  WidgetBackingStore::WidgetBackingStore(GtkWidget* widget, const IntSize& size)
> 
> widget's type could be changed to PlatformWidget.

I used PlatformWidget in the cairo/WidgetBackingStoreCairo.cpp.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list