Changeset 116461 in webkit
- Timestamp:
- May 8, 2012 3:50:11 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r116434 r116461 1 2012-05-08 Ryuan Choi <ryuan.choi@samsung.com> 2 3 [EFL][DRT] WebKit/DRT should not paint webview for the pixel tests. 4 https://bugs.webkit.org/show_bug.cgi?id=79853 5 6 Reviewed by Eric Seidel. 7 8 Screen buffer can be different from rendered results. 9 For example, WebKit/Efl just moves tiles for ewk_view_tiled when scrolling 10 contents. 11 It means that pixel tests can't check regression of ewk_view_tiled. 12 13 This patch changes a way to provide bitmap from painting webview to capturing 14 evas. 15 16 * DumpRenderTree/efl/PixelDumpSupportEfl.cpp: 17 (createBitmapContextFromWebView): 18 1 19 2012-05-08 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> 2 20 -
trunk/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp
r97464 r116461 38 38 #include "RefPtrCairo.h" 39 39 #include "WebCoreSupport/DumpRenderTreeSupportEfl.h" 40 #include "ewk_private.h" 40 #include <Ecore_Evas.h> 41 #include <Evas.h> 41 42 42 43 PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool, bool, bool, bool drawSelectionRect) 43 44 { 44 Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(browser->mainView()));45 E wk_View_Private_Data* privateData = static_cast<Ewk_View_Private_Data*>(smartData->_priv);46 const Evas_Object* mainFrame = browser->mainFrame();45 const Evas_Object* mainView = browser->mainView(); 46 Evas* evas = evas_object_evas_get(mainView); 47 Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(evas); 47 48 48 int x, y, width, height; 49 if (!ewk_frame_visible_content_geometry_get(mainFrame, EINA_TRUE, &x, &y, &width, &height)) 50 return 0; 49 int width, height; 50 evas_object_geometry_get(mainView, 0, 0, &width, &height); 51 51 52 RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height));53 RefPtr<cairo_ t> context = adoptRef(cairo_create(surface.get()));52 const void* pixels = ecore_evas_buffer_pixels_get(ecoreEvas); 53 RefPtr<cairo_surface_t> viewSurface = adoptRef(cairo_image_surface_create_for_data(static_cast<unsigned char*>(const_cast<void*>(pixels)), CAIRO_FORMAT_ARGB32, width, height, width * 4)); 54 54 55 const Eina_Rectangle rect = { x, y, width, height }; 56 if (!ewk_view_paint(privateData, context.get(), &rect)) 57 return 0; 55 RefPtr<cairo_surface_t> imageSurface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height)); 56 RefPtr<cairo_t> context = adoptRef(cairo_create(imageSurface.get())); 57 58 cairo_set_source_surface(context.get(), viewSurface.get(), 0, 0); 59 cairo_paint(context.get()); 58 60 59 61 if (drawSelectionRect) { 62 const Evas_Object* mainFrame = browser->mainFrame(); 60 63 const WebCore::IntRect selectionRect = DumpRenderTreeSupportEfl::selectionRectangle(mainFrame); 61 64
Note: See TracChangeset
for help on using the changeset viewer.