Changeset 106904 in webkit
- Timestamp:
- Feb 6, 2012 9:44:19 PM (12 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r106772 r106904 1 2012-02-06 JungJik Lee <jungjik.lee@samsung.com> 2 3 [EFL] Adopt C++ style using camelCase and full variable names. 4 https://bugs.webkit.org/show_bug.cgi?id=76378 5 6 Reviewed by Andreas Kling. 7 8 Modify the code to use camelCase and spell out variable names instead of using abbreviations. 9 Modify the comments which do not match with actual parameters and correct misspelled words. 10 Adopt EFL Coding style in header files. 11 The logic of the code is not changed. 12 13 * ewk/ewk_cookies.h: 14 * ewk/ewk_frame.cpp: 15 (ewk_frame_selection_get): 16 (ewk_frame_feed_focus_in): 17 (EWKPrivate::coreFrame): 18 * ewk/ewk_frame.h: 19 * ewk/ewk_history.cpp: 20 (ewk_history_item_new): 21 (ewk_history_item_title_get): 22 (ewk_history_item_title_alternate_get): 23 (ewk_history_item_uri_get): 24 (ewk_history_item_uri_original_get): 25 * ewk/ewk_network.h: 26 * ewk/ewk_tiled_backing_store.cpp: 27 (_Ewk_Tiled_Backing_Store_Item): 28 (_Ewk_Tiled_Backing_Store_Data): 29 (_ewk_tiled_backing_store_tile_associate): 30 (_ewk_tiled_backing_store_tile_dissociate): 31 (_ewk_tiled_backing_store_pre_render_request_clear): 32 (_ewk_tiled_backing_store_pre_render_request_process_single): 33 (_ewk_tiled_backing_store_item_fill): 34 (_ewk_tiled_backing_store_item_add): 35 (_ewk_tiled_backing_store_item_smooth_scale_set): 36 (_ewk_tiled_backing_store_view_cols_end_add): 37 (_ewk_tiled_backing_store_view_rows_all_del): 38 (_ewk_tiled_backing_store_render): 39 (_ewk_tiled_backing_store_mem_dbg): 40 (_ewk_tiled_backing_store_sig_usr): 41 (_ewk_tiled_backing_store_smart_add): 42 (_ewk_tiled_backing_store_smart_del): 43 (_ewk_tiled_backing_store_smart_move): 44 (_ewk_tiled_backing_store_smart_resize): 45 (_ewk_tiled_backing_store_recalc_renderers): 46 (_ewk_tiled_backing_store_view_dbg): 47 (_ewk_tiled_backing_store_view_wrap_up): 48 (_ewk_tiled_backing_store_view_wrap_down): 49 (_ewk_tiled_backing_store_view_wrap_left): 50 (_ewk_tiled_backing_store_view_refill): 51 (_ewk_tiled_backing_store_view_pos_apply): 52 (_ewk_tiled_backing_store_smart_calculate_offset_force): 53 (_ewk_tiled_backing_store_smart_calculate_offset): 54 (_ewk_tiled_backing_store_smart_calculate_pos): 55 (_ewk_tiled_backing_store_smart_calculate): 56 (_ewk_tiled_backing_store_scroll_full_offset_set_internal): 57 (ewk_tiled_backing_store_scroll_full_offset_set): 58 (ewk_tiled_backing_store_scroll_full_offset_add): 59 (_ewk_tiled_backing_store_zoom_set_internal): 60 (ewk_tiled_backing_store_zoom_set): 61 (ewk_tiled_backing_store_zoom_weak_set): 62 (ewk_tiled_backing_store_fix_offsets): 63 (ewk_tiled_backing_store_flush): 64 (ewk_tiled_backing_store_pre_render_region): 65 (ewk_tiled_backing_store_pre_render_relative_radius): 66 * ewk/ewk_tiled_backing_store.h: 67 (_Ewk_Tile): 68 * ewk/ewk_tiled_matrix.cpp: 69 (_Ewk_Tile_Matrix): 70 (_ewk_tile_matrix_cell_free): 71 (_ewk_tile_matrix_tile_free): 72 (ewk_tile_matrix_new): 73 (ewk_tile_matrix_free): 74 (ewk_tile_matrix_unused_cache_get): 75 (ewk_tile_matrix_tile_exact_get): 76 (ewk_tile_matrix_tile_new): 77 (ewk_tile_matrix_tile_put): 78 (ewk_tile_matrix_dbg): 79 (ewk_tile_matrix_freeze): 80 (ewk_tile_matrix_thaw): 81 * ewk/ewk_tiled_matrix.h: 82 * ewk/ewk_tiled_model.cpp: 83 (tile_account): 84 (ewk_tile_updates_process): 85 (ewk_tile_unused_cache_tile_put): 86 (ewk_tile_unused_cache_dbg): 87 * ewk/ewk_tiled_model.h: 88 * ewk/ewk_util.h: 89 * ewk/ewk_view.cpp: 90 (_Ewk_View_Private_Data): 91 (_ewk_view_smart_focus_in): 92 (_ewk_view_smart_pre_render_region): 93 (ewk_view_pre_render_region): 94 (ewk_view_toolbars_visible_get): 95 (ewk_view_statusbar_visible_get): 96 (ewk_view_scrollbars_visible_get): 97 (ewk_view_menubar_visible_get): 98 (ewk_view_zoom_range_set): 99 * ewk/ewk_view.h: 100 * ewk/ewk_view_single.cpp: 101 (_ewk_view_single_smart_repaints_process): 102 * ewk/ewk_view_tiled.cpp: 103 (_ewk_view_tiled_smart_backing_store_add): 104 (_ewk_view_tiled_smart_add): 105 (ewk_view_tiled_unused_cache_get): 106 (ewk_view_tiled_unused_cache_set): 107 1 108 2012-02-05 ChangSeok Oh <shivamidow@gmail.com> 2 109 -
trunk/Source/WebKit/efl/ewk/ewk_cookies.h
r95901 r106904 96 96 * @return an @c Eina_List with all the cookies in the cookie jar 97 97 */ 98 EAPI Eina_List *ewk_cookies_get_all(void);98 EAPI Eina_List *ewk_cookies_get_all(void); 99 99 100 100 /** -
trunk/Source/WebKit/efl/ewk/ewk_frame.cpp
r105698 r106904 87 87 #define EWK_FRAME_TYPE_CHECK(ewkFrame, ...) do { } while (0) 88 88 #else 89 #define EWK_FRAME_TYPE_CHECK(ewkFrame, ...) 90 do { 91 const char* _tmp_otype = evas_object_type_get(ewkFrame); 92 if (EINA_UNLIKELY(_tmp_otype != EWK_FRAME_TYPE_STR)) { 93 EINA_LOG_CRIT 94 ("%p (%s) is not of an ewk_frame!", ewkFrame, 95 _tmp_otype ? _tmp_otype : "(null)"); 96 return __VA_ARGS__; 97 } 89 #define EWK_FRAME_TYPE_CHECK(ewkFrame, ...) \ 90 do { \ 91 const char* _tmp_otype = evas_object_type_get(ewkFrame); \ 92 if (EINA_UNLIKELY(_tmp_otype != EWK_FRAME_TYPE_STR)) { \ 93 EINA_LOG_CRIT \ 94 ("%p (%s) is not of an ewk_frame!", ewkFrame, \ 95 _tmp_otype ? _tmp_otype : "(null)"); \ 96 return __VA_ARGS__; \ 97 } \ 98 98 } while (0) 99 99 #endif 100 100 101 #define EWK_FRAME_SD_GET(ewkFrame, p tr)\102 Ewk_Frame_Smart_Data* p tr = static_cast<Ewk_Frame_Smart_Data*>(evas_object_smart_data_get(ewkFrame))103 104 #define EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, p tr, ...)\105 EWK_FRAME_TYPE_CHECK(ewkFrame, __VA_ARGS__); 106 EWK_FRAME_SD_GET(ewkFrame, p tr);\107 if (!p tr) {\108 CRITICAL("no smart data for object %p (%s)", 109 ewkFrame, evas_object_type_get(ewkFrame)); 110 return __VA_ARGS__; 101 #define EWK_FRAME_SD_GET(ewkFrame, pointer) \ 102 Ewk_Frame_Smart_Data* pointer = static_cast<Ewk_Frame_Smart_Data*>(evas_object_smart_data_get(ewkFrame)) 103 104 #define EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, pointer, ...) \ 105 EWK_FRAME_TYPE_CHECK(ewkFrame, __VA_ARGS__); \ 106 EWK_FRAME_SD_GET(ewkFrame, pointer); \ 107 if (!pointer) { \ 108 CRITICAL("no smart data for object %p (%s)", \ 109 ewkFrame, evas_object_type_get(ewkFrame)); \ 110 return __VA_ARGS__; \ 111 111 } 112 112 … … 469 469 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, 0); 470 470 EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, 0); 471 WTF::CString s = smartData->frame->editor()->selectedText().utf8();472 if (s .isNull())471 WTF::CString selectedText = smartData->frame->editor()->selectedText().utf8(); 472 if (selectedText.isNull()) 473 473 return 0; 474 return strdup(s .data());474 return strdup(selectedText.data()); 475 475 } 476 476 … … 835 835 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, false); 836 836 EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, false); 837 WebCore::FocusController* c= smartData->frame->page()->focusController();838 c->setFocusedFrame(smartData->frame);837 WebCore::FocusController* focusController = smartData->frame->page()->focusController(); 838 focusController->setFocusedFrame(smartData->frame); 839 839 return true; 840 840 } … … 1775 1775 namespace EWKPrivate { 1776 1776 1777 WebCore::Frame *coreFrame(const Evas_Object *ewkFrame)1777 WebCore::Frame* coreFrame(const Evas_Object* ewkFrame) 1778 1778 { 1779 1779 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, 0); -
trunk/Source/WebKit/efl/ewk/ewk_frame.h
r102601 r106904 858 858 * or @c 0 in case of failure. 859 859 */ 860 EAPI char * ewk_frame_plain_text_get(const Evas_Object*o);860 EAPI char *ewk_frame_plain_text_get(const Evas_Object *o); 861 861 862 862 /** -
trunk/Source/WebKit/efl/ewk/ewk_history.cpp
r101744 r106904 256 256 Ewk_History_Item* ewk_history_item_new(const char* uri, const char* title) 257 257 { 258 WTF::String u= WTF::String::fromUTF8(uri);259 WTF::String t= WTF::String::fromUTF8(title);260 WTF::RefPtr<WebCore::HistoryItem> core = WebCore::HistoryItem::create( u, t, 0);258 WTF::String historyUri = WTF::String::fromUTF8(uri); 259 WTF::String historyTitle = WTF::String::fromUTF8(title); 260 WTF::RefPtr<WebCore::HistoryItem> core = WebCore::HistoryItem::create(historyUri, historyTitle, 0); 261 261 Ewk_History_Item* item = ewk_history_item_new_from_core(core.release().leakRef()); 262 262 return item; … … 288 288 EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); 289 289 // hide the following optimzation from outside 290 Ewk_History_Item* item1= const_cast<Ewk_History_Item*>(item);291 eina_stringshare_replace(& item1->title, core->title().utf8().data());292 return item1->title;290 Ewk_History_Item* historyItem = const_cast<Ewk_History_Item*>(item); 291 eina_stringshare_replace(&historyItem->title, core->title().utf8().data()); 292 return historyItem->title; 293 293 } 294 294 … … 297 297 EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); 298 298 // hide the following optimzation from outside 299 Ewk_History_Item* item1= const_cast<Ewk_History_Item*>(item);300 eina_stringshare_replace(& item1->alternateTitle,299 Ewk_History_Item* historyItem = const_cast<Ewk_History_Item*>(item); 300 eina_stringshare_replace(&historyItem->alternateTitle, 301 301 core->alternateTitle().utf8().data()); 302 return item1->alternateTitle;302 return historyItem->alternateTitle; 303 303 } 304 304 … … 315 315 EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); 316 316 // hide the following optimzation from outside 317 Ewk_History_Item* i= const_cast<Ewk_History_Item*>((item));318 eina_stringshare_replace(& i->uri, core->urlString().utf8().data());319 return i->uri;317 Ewk_History_Item* historyItem = const_cast<Ewk_History_Item*>((item)); 318 eina_stringshare_replace(&historyItem->uri, core->urlString().utf8().data()); 319 return historyItem->uri; 320 320 } 321 321 … … 324 324 EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); 325 325 // hide the following optimzation from outside 326 Ewk_History_Item* i= const_cast<Ewk_History_Item*>(item);327 eina_stringshare_replace(& i->originalUri,326 Ewk_History_Item* historyItem = const_cast<Ewk_History_Item*>(item); 327 eina_stringshare_replace(&historyItem->originalUri, 328 328 core->originalURLString().utf8().data()); 329 return i->originalUri;329 return historyItem->originalUri; 330 330 } 331 331 -
trunk/Source/WebKit/efl/ewk/ewk_network.h
r102599 r106904 120 120 * backend was used. 121 121 */ 122 EAPI SoupSession *ewk_network_default_soup_session_get(void);122 EAPI SoupSession *ewk_network_default_soup_session_get(void); 123 123 124 124 #ifdef __cplusplus -
trunk/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp
r106627 r106904 34 34 #include <string.h> 35 35 36 #define IDX(col , row, rowspan) (col+ (row * rowspan))36 #define IDX(column, row, rowspan) (column + (row * rowspan)) 37 37 38 38 typedef struct _Ewk_Tiled_Backing_Store_Data Ewk_Tiled_Backing_Store_Data; … … 46 46 Evas_Coord x, y, width, height; 47 47 } geometry; 48 bool smooth _scale;48 bool smoothScale; 49 49 }; 50 50 … … 62 62 Eina_Inlist** items; 63 63 Evas_Coord x, y, width, height; 64 long col s, rows;64 long columns, rows; 65 65 struct { 66 66 Evas_Coord width, height; … … 72 72 struct { 73 73 Evas_Coord x, y; 74 } cur , old, base, zoomCenter;74 } current, old, base, zoomCenter; 75 75 } offset; 76 76 bool visible : 1; … … 110 110 } changed; 111 111 #ifdef DEBUG_MEM_LEAKS 112 Ecore_Event_Handler* sig _usr;112 Ecore_Event_Handler* signalUser; 113 113 #endif 114 114 }; … … 117 117 int _ewk_tiled_log_dom = -1; 118 118 119 #define PRIV_DATA_GET_OR_RETURN(obj, ptr, ...) 119 #define PRIV_DATA_GET_OR_RETURN(obj, ptr, ...) \ 120 120 Ewk_Tiled_Backing_Store_Data* ptr = static_cast<Ewk_Tiled_Backing_Store_Data*>(evas_object_smart_data_get(obj)); \ 121 if (!ptr) { 122 CRITICAL("no private data in obj=%p", obj); 123 return __VA_ARGS__; 121 if (!ptr) { \ 122 CRITICAL("no private data in obj=%p", obj); \ 123 return __VA_ARGS__; \ 124 124 } 125 125 … … 205 205 { 206 206 if (item->tile) 207 CRITICAL("it ->tile=%p, but it should be 0!", item->tile);207 CRITICAL("item->tile=%p, but it should be 0!", item->tile); 208 208 item->tile = tile; 209 209 evas_object_move(item->tile->image, item->geometry.x, item->geometry.y); … … 211 211 evas_object_image_fill_set 212 212 (item->tile->image, 0, 0, item->geometry.width, item->geometry.height); 213 evas_object_image_smooth_scale_set(item->tile->image, item->smooth _scale);213 evas_object_image_smooth_scale_set(item->tile->image, item->smoothScale); 214 214 evas_object_image_alpha_set(item->tile->image, priv->view.tile.hasAlpha); 215 215 … … 222 222 static void _ewk_tiled_backing_store_tile_dissociate(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Item* item, double lastUsed) 223 223 { 224 Ewk_Tile_Unused_Cache* tile dUnusedCache;224 Ewk_Tile_Unused_Cache* tileUnusedCache; 225 225 ewk_tile_hide(item->tile); 226 226 if (!ewk_tile_visible_get(item->tile)) 227 227 evas_object_smart_member_del(item->tile->image); 228 228 ewk_tile_matrix_tile_put(priv->model.matrix, item->tile, lastUsed); 229 tile dUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);230 ewk_tile_unused_cache_auto_flush(tile dUnusedCache);229 tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix); 230 ewk_tile_unused_cache_auto_flush(tileUnusedCache); 231 231 232 232 item->tile = 0; … … 294 294 { 295 295 Eina_Inlist** preRenderList = &priv->render.preRenderRequests; 296 Eina_Inlist* iter = *preRenderList, * tmp;296 Eina_Inlist* iter = *preRenderList, *next; 297 297 while (iter) { 298 298 Ewk_Tiled_Backing_Store_Pre_Render_Request* request = 299 299 EINA_INLIST_CONTAINER_GET( 300 300 iter, Ewk_Tiled_Backing_Store_Pre_Render_Request); 301 tmp= iter->next;301 next = iter->next; 302 302 *preRenderList = eina_inlist_remove(*preRenderList, iter); 303 iter = tmp;303 iter = next; 304 304 free(request); 305 305 } 306 306 } 307 307 308 /* assumes priv->process.pre _cbwas called if required! */308 /* assumes priv->process.preCallback was called if required! */ 309 309 static void _ewk_tiled_backing_store_pre_render_request_process_single(Ewk_Tiled_Backing_Store_Data* priv) 310 310 { … … 313 313 Ewk_Tile_Matrix* tileMatrix = priv->model.matrix; 314 314 Ewk_Tile* tile; 315 Ewk_Tile_Unused_Cache* tile dUnusedCache;315 Ewk_Tile_Unused_Cache* tileUnusedCache; 316 316 unsigned long column, row; 317 317 float zoom; … … 350 350 end: 351 351 _ewk_tiled_backing_store_pre_render_request_del(priv, request); 352 tile dUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);353 ewk_tile_unused_cache_auto_flush(tile dUnusedCache);352 tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix); 353 ewk_tile_unused_cache_auto_flush(tileUnusedCache); 354 354 } 355 355 … … 432 432 if (item->tile) { 433 433 Ewk_Tile* old = item->tile; 434 if (old->row != currentRow || old->col != currentColumn || old->zoom != zoom)434 if (old->row != currentRow || old->column != currentColumn || old->zoom != zoom) 435 435 _ewk_tiled_backing_store_tile_dissociate(priv, item, lastUsed); 436 else if (old->row == currentRow && old->col == currentColumn && old->zoom == zoom)436 else if (old->row == currentRow && old->column == currentColumn && old->zoom == zoom) 437 437 goto end; 438 438 } … … 441 441 442 442 if (!tile) { 443 /* NOTE: it never returns 0 if it ->tile was set! */443 /* NOTE: it never returns 0 if item->tile was set! */ 444 444 if (item->tile) { 445 CRITICAL("it ->tile=%p, but it should be 0!", item->tile);445 CRITICAL("item->tile=%p, but it should be 0!", item->tile); 446 446 _ewk_tiled_backing_store_tile_dissociate(priv, item, 447 447 lastUsed); … … 475 475 Evas_Coord x, y, tileWidth, tileHeight; 476 476 477 DBG("ewkBackingStore %p", priv->self);477 DBG("ewkBackingStore=%p", priv->self); 478 478 479 479 item = static_cast<Ewk_Tiled_Backing_Store_Item*>(malloc(sizeof(*item))); … … 483 483 tileWidth = priv->view.tile.width; 484 484 tileHeight = priv->view.tile.height; 485 x = priv->view.offset.base.x + priv->view.x + tileWidth *column;486 y = priv->view.offset.base.y + priv->view.y + tileHeight *row;485 x = priv->view.offset.base.x + priv->view.x + tileWidth * column; 486 y = priv->view.offset.base.y + priv->view.y + tileHeight * row; 487 487 488 488 item->tile = 0; 489 489 490 item->smooth _scale = priv->view.tile.zoomWeakSmoothScale;490 item->smoothScale = priv->view.tile.zoomWeakSmoothScale; 491 491 _ewk_tiled_backing_store_item_move(item, x, y); 492 492 _ewk_tiled_backing_store_item_resize(item, tileWidth, tileHeight); … … 511 511 static void _ewk_tiled_backing_store_item_smooth_scale_set(Ewk_Tiled_Backing_Store_Item* item, Eina_Bool smoothScale) 512 512 { 513 if (item->smooth _scale == smoothScale)513 if (item->smoothScale == smoothScale) 514 514 return; 515 515 … … 550 550 551 551 for (i = 0; i < count; i++, baseColumn++) { 552 Ewk_Tiled_Backing_Store_Item* it ;553 554 it = _ewk_tiled_backing_store_item_add(priv, baseColumn, row);555 if (!it ) {552 Ewk_Tiled_Backing_Store_Item* item; 553 554 item = _ewk_tiled_backing_store_item_add(priv, baseColumn, row); 555 if (!item) { 556 556 CRITICAL("failed to add column %u of %u in row %u.", i, count, row); 557 557 _ewk_tiled_backing_store_view_cols_end_del(priv, rowList, i); … … 559 559 } 560 560 561 *rowList = eina_inlist_append(*rowList, EINA_INLIST_GET(it ));561 *rowList = eina_inlist_append(*rowList, EINA_INLIST_GET(item)); 562 562 } 563 563 return true; … … 593 593 free(priv->view.items); 594 594 priv->view.items = 0; 595 priv->view.col s = 0;595 priv->view.columns = 0; 596 596 priv->view.rows = 0; 597 597 } … … 602 602 603 603 INF("TODO %p (visible? %d) [%lu,%lu] %d,%d + %dx%d", 604 tile, tile->visible, tile->col , tile->row, area->x, area->y, area->w, area->h);604 tile, tile->visible, tile->column, tile->row, area->x, area->y, area->w, area->h); 605 605 606 606 if (!tile->visible) … … 659 659 660 660 printf("\n--- BEGIN DEBUG TILED BACKING STORE MEMORY [%d] --\n" 661 "t =%0.2f, obj=%p, priv=%p, view.items=%p, matrix=%p\n",661 "tile=%0.2f, obj=%p, priv=%p, view.items=%p, matrix=%p\n", 662 662 run, ecore_loop_time_get(), 663 663 priv->self, priv, priv->view.items, priv->model.matrix); … … 671 671 static Eina_Bool _ewk_tiled_backing_store_sig_usr(void* data, int type, void* event) 672 672 { 673 Ecore_Event_Signal_User* sig = (Ecore_Event_Signal_User*)event;673 Ecore_Event_Signal_User* signalUser = (Ecore_Event_Signal_User*)event; 674 674 Ewk_Tiled_Backing_Store_Data* priv = (Ewk_Tiled_Backing_Store_Data*)data; 675 675 676 if (sig ->number == 2) {677 Ewk_Tile_Unused_Cache* til ieUnusedCache;678 til ieUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);679 ewk_tile_unused_cache_auto_flush(til ieUnusedCache);676 if (signalUser->number == 2) { 677 Ewk_Tile_Unused_Cache* tileUnusedCache; 678 tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix); 679 ewk_tile_unused_cache_auto_flush(tileUnusedCache); 680 680 } 681 681 … … 700 700 priv->view.tile.width = defaultTileWidth; 701 701 priv->view.tile.height = defaultTileHeigth; 702 priv->view.offset.cur .x = 0;703 priv->view.offset.cur .y = 0;702 priv->view.offset.current.x = 0; 703 priv->view.offset.current.y = 0; 704 704 priv->view.offset.old.x = 0; 705 705 priv->view.offset.old.y = 0; … … 736 736 737 737 #ifdef DEBUG_MEM_LEAKS 738 priv->sig _usr = ecore_event_handler_add738 priv->signalUser = ecore_event_handler_add 739 739 (ECORE_EVENT_SIGNAL_USER, _ewk_tiled_backing_store_sig_usr, priv); 740 740 #endif … … 744 744 { 745 745 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv); 746 DBG("ewkBackingStore %p", ewkBackingStore);746 DBG("ewkBackingStore=%p", ewkBackingStore); 747 747 Ewk_Tile_Unused_Cache* tileUnusedCache; 748 748 … … 776 776 static void _ewk_tiled_backing_store_smart_move(Evas_Object* ewkBackingStore, Evas_Coord x, Evas_Coord y) 777 777 { 778 DBG("ewkBackingStore %p, new pos: %dx%d", ewkBackingStore, x, y);778 DBG("ewkBackingStore=%p, new pos: %dx%d", ewkBackingStore, x, y); 779 779 780 780 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv); … … 792 792 static void _ewk_tiled_backing_store_smart_resize(Evas_Object* ewkBackingStore, Evas_Coord width, Evas_Coord height) 793 793 { 794 DBG("ewkBackingStore %p, new size: %dx%d", ewkBackingStore, width, height);794 DBG("ewkBackingStore=%p, new size: %dx%d", ewkBackingStore, width, height); 795 795 796 796 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv); … … 826 826 { 827 827 long columns, rows, oldRows, oldCols; 828 INF("ewkBackingStore %p, new size: %dx%d", priv->self, width, height);828 INF("ewkBackingStore=%p, new size: %dx%d", priv->self, width, height); 829 829 830 830 columns = 1 + static_cast<int>(ceil(width / static_cast<float>(tileWidth))); 831 831 rows = 1 + static_cast<int>(ceil(height / static_cast<float>(tileHeight))); 832 832 833 INF("ewkBackingStore %p new grid size cols: %ld, rows: %ld, was %ld, %ld",834 priv->self, columns, rows, priv->view.col s, priv->view.rows);835 836 if (priv->view.col s == columns && priv->view.rows == rows)837 return; 838 839 oldCols = priv->view.col s;833 INF("ewkBackingStore=%p new grid size columns: %ld, rows: %ld, was %ld, %ld", 834 priv->self, columns, rows, priv->view.columns, priv->view.rows); 835 836 if (priv->view.columns == columns && priv->view.rows == rows) 837 return; 838 839 oldCols = priv->view.columns; 840 840 oldRows = priv->view.rows; 841 841 … … 853 853 priv->view.items = static_cast<Eina_Inlist**>(newItems); 854 854 priv->view.rows = rows; 855 priv->view.col s = columns;855 priv->view.columns = columns; 856 856 if (rows > oldRows) { 857 857 Eina_Inlist** start = priv->view.items + oldRows; … … 859 859 for (; start < end; start++) { 860 860 *start = 0; 861 Eina_Bool r = _ewk_tiled_backing_store_view_cols_end_add(priv, start, 0, columns);862 if (!r ) {861 Eina_Bool result = _ewk_tiled_backing_store_view_cols_end_add(priv, start, 0, columns); 862 if (!result) { 863 863 CRITICAL("failed to allocate %ld columns", columns); 864 864 _ewk_tiled_backing_store_view_rows_range_del(priv, priv->view.items + oldRows, start); … … 916 916 Eina_Inlist** start, **end; 917 917 printf("tiles=%2ld,%2ld model=%2ld,%2ld [%dx%d] base=%+3ld,%+4ld offset=%+4d,%+4d old=%+4d,%+4d base=%+3d,%+3d\n", 918 priv->view.col s, priv->view.rows,918 priv->view.columns, priv->view.rows, 919 919 priv->model.current.columns, priv->model.current.rows, 920 920 priv->model.width, priv->model.height, 921 921 priv->model.base.column, priv->model.base.row, 922 priv->view.offset.cur .x, priv->view.offset.cur.y,922 priv->view.offset.current.x, priv->view.offset.current.y, 923 923 priv->view.offset.old.x, priv->view.offset.old.y, 924 924 priv->view.offset.base.x, priv->view.offset.base.y); … … 935 935 printf(" ;"); 936 936 else 937 printf("%8p %lu,%lu;", item->tile, item->tile->col , item->tile->row);937 printf("%8p %lu,%lu;", item->tile, item->tile->column, item->tile->row); 938 938 } 939 939 printf("\n"); … … 973 973 Ewk_Tiled_Backing_Store_Item* item; 974 974 Evas_Coord tilePositionX = originX; 975 int co unt1= 0;975 int column = 0; 976 976 977 977 for (iteratorList = iteratorStart; iteratorList < iteratorEnd; iteratorList++) … … 983 983 _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY); 984 984 tilePositionX += tileWidth; 985 _ewk_tiled_backing_store_item_fill(priv, item, co unt1, lastRow);986 co unt1++;985 _ewk_tiled_backing_store_item_fill(priv, item, column, lastRow); 986 column++; 987 987 } 988 988 tilePositionY += tileHeight; … … 1021 1021 Ewk_Tiled_Backing_Store_Item* item; 1022 1022 Evas_Coord tilePositionX = originX; 1023 int co unt1= 0;1023 int column = 0; 1024 1024 1025 1025 for (iteratorList = iteratorStart; iteratorList > iteratorEnd; iteratorList--) … … 1031 1031 _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY); 1032 1032 tilePositionX += tileWidth; 1033 _ewk_tiled_backing_store_item_fill(priv, item, co unt1, 0);1034 co unt1++;1033 _ewk_tiled_backing_store_item_fill(priv, item, column, 0); 1034 column++; 1035 1035 } 1036 1036 tilePositionY -= tileHeight; … … 1043 1043 * Move left-most (first) column right as last (right-most). 1044 1044 * 1045 * The final result is visually the same, but logically the first col that1045 * The final result is visually the same, but logically the first column that 1046 1046 * went out of screen is now at last and filled with new model items. 1047 1047 * 1048 1048 * This is worth just when @a count is smaller than @c 1049 * priv->view.col s, after that one is refilling the whole matrix so it1049 * priv->view.columns, after that one is refilling the whole matrix so it 1050 1050 * is better to trigger full refill. 1051 1051 * … … 1054 1054 static void _ewk_tiled_backing_store_view_wrap_left(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count) 1055 1055 { 1056 unsigned int row, lastColumn = priv->view.col s - 1;1056 unsigned int row, lastColumn = priv->view.columns - 1; 1057 1057 Evas_Coord tileWidth = priv->view.tile.width; 1058 1058 Evas_Coord tileHeight = priv->view.tile.height; 1059 1059 Evas_Coord offsetX = priv->view.offset.base.x + count * tileWidth; 1060 Evas_Coord o y= y + priv->view.offset.base.y;1060 Evas_Coord offsetY = y + priv->view.offset.base.y; 1061 1061 Eina_Inlist** iterator; 1062 1062 Eina_Inlist** iteratorEnd; … … 1079 1079 *iterator = eina_inlist_demote(*iterator, *iterator); 1080 1080 1081 _ewk_tiled_backing_store_item_move(it, tilePositionX, o y);1081 _ewk_tiled_backing_store_item_move(it, tilePositionX, offsetY); 1082 1082 _ewk_tiled_backing_store_item_fill(priv, it, column, row); 1083 1083 } 1084 o y+= tileHeight;1084 offsetY += tileHeight; 1085 1085 } 1086 1086 … … 1092 1092 * Move right-most (last) column left as first (left-most). 1093 1093 * 1094 * The final result is visually the same, but logically the last col that1094 * The final result is visually the same, but logically the last column that 1095 1095 * went out of screen is now at first and filled with new model items. 1096 1096 * 1097 1097 * This is worth just when @a count is smaller than @c 1098 * priv->view.col s, after that one is refilling the whole matrix so it1098 * priv->view.columns, after that one is refilling the whole matrix so it 1099 1099 * is better to trigger full refill. 1100 1100 * … … 1140 1140 Eina_Inlist** iterator, **iteratorEnd; 1141 1141 Evas_Coord baseTilePositionX, tilePositionY, tileWidth, tileHeight; 1142 unsigned int r ;1142 unsigned int row; 1143 1143 1144 1144 evas_object_move(priv->base.clipper, x, y); … … 1152 1152 iterator = priv->view.items; 1153 1153 iteratorEnd = iterator + priv->view.rows; 1154 r = 0;1154 row = 0; 1155 1155 1156 1156 priv->model.base.column -= stepX; 1157 1157 priv->model.base.row -= stepY; 1158 1158 1159 for (; iterator < iteratorEnd; iterator++, r ++) {1159 for (; iterator < iteratorEnd; iterator++, row++) { 1160 1160 Ewk_Tiled_Backing_Store_Item* item; 1161 1161 Evas_Coord newTilePositionX = baseTilePositionX; 1162 unsigned int co unt= 0;1162 unsigned int column = 0; 1163 1163 EINA_INLIST_FOREACH(*iterator, item) { 1164 _ewk_tiled_backing_store_item_fill(priv, item, co unt, r);1164 _ewk_tiled_backing_store_item_fill(priv, item, column, row); 1165 1165 _ewk_tiled_backing_store_item_move(item, newTilePositionX, tilePositionY); 1166 co unt++;1166 column++; 1167 1167 newTilePositionX += tileWidth; 1168 1168 } … … 1187 1187 iteratorEnd = iterator + priv->view.rows; 1188 1188 for (; iterator < iteratorEnd; iterator++) { 1189 Ewk_Tiled_Backing_Store_Item* it ;1190 Evas_Coord o x= baseTilePositionX;1191 EINA_INLIST_FOREACH(*iterator, it ) {1192 _ewk_tiled_backing_store_item_move(it , ox, baseTilePositionY);1193 o x+= tileWidth;1189 Ewk_Tiled_Backing_Store_Item* item; 1190 Evas_Coord offsetX = baseTilePositionX; 1191 EINA_INLIST_FOREACH(*iterator, item) { 1192 _ewk_tiled_backing_store_item_move(item, offsetX, baseTilePositionY); 1193 offsetX += tileWidth; 1194 1194 } 1195 1195 baseTilePositionY += tileHeight; … … 1199 1199 static void _ewk_tiled_backing_store_smart_calculate_offset_force(Ewk_Tiled_Backing_Store_Data* priv) 1200 1200 { 1201 Evas_Coord deltaX = priv->view.offset.cur .x - priv->view.offset.old.x;1202 Evas_Coord deltaY = priv->view.offset.cur .y - priv->view.offset.old.y;1201 Evas_Coord deltaX = priv->view.offset.current.x - priv->view.offset.old.x; 1202 Evas_Coord deltaY = priv->view.offset.current.y - priv->view.offset.old.y; 1203 1203 Evas_Coord tileWidth, tileHeight; 1204 1204 int stepY, stepX; 1205 1205 1206 INF("ewkBackingStore %p, offset: %+4d, %+4d (%+4d, %+4d)",1207 priv->self, deltaX, deltaY, priv->view.offset.cur .x, priv->view.offset.cur.y);1206 INF("ewkBackingStore=%p, offset: %+4d, %+4d (%+4d, %+4d)", 1207 priv->self, deltaX, deltaY, priv->view.offset.current.x, priv->view.offset.current.y); 1208 1208 1209 1209 tileWidth = priv->view.tile.width; 1210 1210 tileHeight = priv->view.tile.height; 1211 1211 1212 long newColumn = -priv->view.offset.cur .x / tileWidth;1212 long newColumn = -priv->view.offset.current.x / tileWidth; 1213 1213 stepX = priv->model.base.column - newColumn; 1214 long newRow = -priv->view.offset.cur .y / tileHeight;1214 long newRow = -priv->view.offset.current.y / tileHeight; 1215 1215 stepY = priv->model.base.row - newRow; 1216 1216 1217 priv->view.offset.old.x = priv->view.offset.cur .x;1218 priv->view.offset.old.y = priv->view.offset.cur .y;1217 priv->view.offset.old.x = priv->view.offset.current.x; 1218 priv->view.offset.old.y = priv->view.offset.current.y; 1219 1219 evas_object_move( 1220 1220 priv->contentsClipper, 1221 priv->view.offset.cur .x + priv->view.x,1222 priv->view.offset.cur .y + priv->view.y);1221 priv->view.offset.current.x + priv->view.x, 1222 priv->view.offset.current.y + priv->view.y); 1223 1223 1224 1224 priv->view.offset.base.x += deltaX - stepX * tileWidth; … … 1231 1231 static void _ewk_tiled_backing_store_smart_calculate_offset(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y) 1232 1232 { 1233 Evas_Coord deltaX = priv->view.offset.cur .x - priv->view.offset.old.x;1234 Evas_Coord deltaY = priv->view.offset.cur .y - priv->view.offset.old.y;1233 Evas_Coord deltaX = priv->view.offset.current.x - priv->view.offset.old.x; 1234 Evas_Coord deltaY = priv->view.offset.current.y - priv->view.offset.old.y; 1235 1235 Evas_Coord tileWidth, tileHeight; 1236 1236 int stepY, stepX; 1237 1237 1238 INF("ewkBackingStore %p, offset: %+4d, %+4d (%+4d, %+4d)",1239 priv->self, deltaX, deltaY, priv->view.offset.cur .x, priv->view.offset.cur.y);1238 INF("ewkBackingStore=%p, offset: %+4d, %+4d (%+4d, %+4d)", 1239 priv->self, deltaX, deltaY, priv->view.offset.current.x, priv->view.offset.current.y); 1240 1240 1241 1241 if (!deltaX && !deltaY) … … 1245 1245 tileHeight = priv->view.tile.height; 1246 1246 1247 long newCol = -priv->view.offset.cur .x / tileWidth;1247 long newCol = -priv->view.offset.current.x / tileWidth; 1248 1248 stepX = priv->model.base.column - newCol; 1249 long newRow = -priv->view.offset.cur .y / tileHeight;1249 long newRow = -priv->view.offset.current.y / tileHeight; 1250 1250 stepY = priv->model.base.row - newRow; 1251 1251 1252 priv->view.offset.old.x = priv->view.offset.cur .x;1253 priv->view.offset.old.y = priv->view.offset.cur .y;1252 priv->view.offset.old.x = priv->view.offset.current.x; 1253 priv->view.offset.old.y = priv->view.offset.current.y; 1254 1254 evas_object_move( 1255 1255 priv->contentsClipper, 1256 priv->view.offset.cur .x + priv->view.x,1257 priv->view.offset.cur .y + priv->view.y);1258 1259 if ((stepX < 0 && stepX <= -priv->view.col s)1260 || (stepX > 0 && stepX >= priv->view.col s)1256 priv->view.offset.current.x + priv->view.x, 1257 priv->view.offset.current.y + priv->view.y); 1258 1259 if ((stepX < 0 && stepX <= -priv->view.columns) 1260 || (stepX > 0 && stepX >= priv->view.columns) 1261 1261 || (stepY < 0 && stepY <= -priv->view.rows) 1262 1262 || (stepY > 0 && stepY >= priv->view.rows)) { … … 1293 1293 evas_object_move( 1294 1294 priv->contentsClipper, 1295 priv->view.offset.cur .x + priv->view.x,1296 priv->view.offset.cur .y + priv->view.y);1295 priv->view.offset.current.x + priv->view.x, 1296 priv->view.offset.current.y + priv->view.y); 1297 1297 } 1298 1298 … … 1316 1316 1317 1317 evas_object_geometry_get(ewkBackingStore, &x, &y, &width, &height); 1318 DBG("ewkBackingStore %p at %d,%d + %dx%d", ewkBackingStore, x, y, width, height);1318 DBG("ewkBackingStore=%p at %d,%d + %dx%d", ewkBackingStore, x, y, width, height); 1319 1319 1320 1320 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv); … … 1385 1385 || priv->view.offset.base.y > 0 1386 1386 || priv->view.offset.base.y <= - priv->view.tile.height) 1387 ERR("incorrect base offset %+4d,%+4d, tile=%dx%d, cur =%+4d,%+4d\n",1387 ERR("incorrect base offset %+4d,%+4d, tile=%dx%d, current=%+4d,%+4d\n", 1388 1388 priv->view.offset.base.x, priv->view.offset.base.y, 1389 1389 priv->view.tile.width, priv->view.tile.height, 1390 priv->view.offset.cur .x, priv->view.offset.cur.y);1390 priv->view.offset.current.x, priv->view.offset.current.y); 1391 1391 1392 1392 } … … 1452 1452 return false; 1453 1453 1454 priv->view.offset.cur .x = x;1455 priv->view.offset.cur .y = y;1454 priv->view.offset.current.x = x; 1455 priv->view.offset.current.y = y; 1456 1456 1457 1457 priv->changed.offset = true; … … 1463 1463 Eina_Bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object* ewkBackingStore, Evas_Coord x, Evas_Coord y) 1464 1464 { 1465 DBG("ewkBackingStore %p, x=%d, y=%d", ewkBackingStore, x, y);1465 DBG("ewkBackingStore=%p, x=%d, y=%d", ewkBackingStore, x, y); 1466 1466 1467 1467 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false); 1468 if (x == priv->view.offset.cur .x && y == priv->view.offset.cur.y)1468 if (x == priv->view.offset.current.x && y == priv->view.offset.current.y) 1469 1469 return true; 1470 1470 … … 1474 1474 Eina_Bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object* ewkBackingStore, Evas_Coord deltaX, Evas_Coord deltaY) 1475 1475 { 1476 DBG("ewkBackingStore %p, deltaX=%d, deltaY=%d", ewkBackingStore, deltaX, deltaY);1476 DBG("ewkBackingStore=%p, deltaX=%d, deltaY=%d", ewkBackingStore, deltaX, deltaY); 1477 1477 1478 1478 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false); … … 1481 1481 1482 1482 return _ewk_tiled_backing_store_scroll_full_offset_set_internal 1483 (priv, priv->view.offset.cur .x + deltaX, priv->view.offset.cur.y + deltaY);1483 (priv, priv->view.offset.current.x + deltaX, priv->view.offset.current.y + deltaY); 1484 1484 } 1485 1485 1486 1486 static Eina_Bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_Data* priv, float* zoom, Evas_Coord currentX, Evas_Coord currentY, Evas_Coord* offsetX, Evas_Coord* offsetY) 1487 1487 { 1488 *offsetX = priv->view.offset.cur .x;1489 *offsetY = priv->view.offset.cur .y;1488 *offsetX = priv->view.offset.current.x; 1489 *offsetY = priv->view.offset.current.y; 1490 1490 1491 1491 if (fabsf(priv->view.tile.zoom - *zoom) < zoomStepMinimum) { … … 1518 1518 } 1519 1519 Eina_Inlist** iterator, **iteratorEnd; 1520 Ewk_Tiled_Backing_Store_Item* it ;1521 1522 Evas_Coord newX = currentX + (priv->view.offset.cur .x - currentX) * scale;1523 Evas_Coord newY = currentY + (priv->view.offset.cur .y - currentY) * scale;1520 Ewk_Tiled_Backing_Store_Item* item; 1521 1522 Evas_Coord newX = currentX + (priv->view.offset.current.x - currentX) * scale; 1523 Evas_Coord newY = currentY + (priv->view.offset.current.y - currentY) * scale; 1524 1524 1525 1525 Evas_Coord modelWidth = priv->model.width * scale; … … 1545 1545 _ewk_tiled_backing_store_changed(priv); 1546 1546 1547 priv->view.offset.cur .x = newX;1548 priv->view.offset.cur .y = newY;1547 priv->view.offset.current.x = newX; 1548 priv->view.offset.current.y = newY; 1549 1549 priv->view.offset.base.x = baseX; 1550 1550 priv->view.offset.base.y = baseY; 1551 1551 1552 priv->view.offset.old.x = priv->view.offset.cur .x;1553 priv->view.offset.old.y = priv->view.offset.cur .y;1554 *offsetX = priv->view.offset.cur .x;1555 *offsetY = priv->view.offset.cur .y;1552 priv->view.offset.old.x = priv->view.offset.current.x; 1553 priv->view.offset.old.y = priv->view.offset.current.y; 1554 *offsetX = priv->view.offset.current.x; 1555 *offsetY = priv->view.offset.current.y; 1556 1556 1557 1557 evas_object_move( … … 1572 1572 Eina_Inlist* lst = *iterator; 1573 1573 1574 EINA_INLIST_FOREACH(lst, it ) {1575 _ewk_tiled_backing_store_item_move(it , tilePositionX, tilePositionY);1576 _ewk_tiled_backing_store_item_resize(it , tileWidth, tileHeight);1574 EINA_INLIST_FOREACH(lst, item) { 1575 _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY); 1576 _ewk_tiled_backing_store_item_resize(item, tileWidth, tileHeight); 1577 1577 tilePositionX += tileWidth; 1578 1578 } … … 1585 1585 Eina_Bool ewk_tiled_backing_store_zoom_set(Evas_Object* ewkBackingStore, float* zoom, Evas_Coord currentX, Evas_Coord currentY, Evas_Coord* offsetX, Evas_Coord* offsetY) 1586 1586 { 1587 DBG("ewkBackingStore %p, zoom=%f", ewkBackingStore, *zoom);1587 DBG("ewkBackingStore=%p, zoom=%f", ewkBackingStore, *zoom); 1588 1588 1589 1589 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false); … … 1594 1594 Eina_Bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object* ewkBackingStore, float zoom, Evas_Coord currentX, Evas_Coord currentY) 1595 1595 { 1596 DBG("ewkBackingStore %p, zoom=%f", ewkBackingStore, zoom);1596 DBG("ewkBackingStore=%p, zoom=%f", ewkBackingStore, zoom); 1597 1597 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false); 1598 1598 if (!priv->view.width || !priv->view.height) … … 1617 1617 int vrows = static_cast<int>(ceil(priv->view.height /static_cast<float>(tileHeight)) + 1); 1618 1618 int vcols = static_cast<int>(ceil(priv->view.width / static_cast<float>(tileWidth)) + 1); 1619 Evas_Coord newX = currentX + (priv->view.offset.cur .x - currentX) * scale;1620 Evas_Coord newY = currentY + (priv->view.offset.cur .y - currentY) * scale;1619 Evas_Coord newX = currentX + (priv->view.offset.current.x - currentX) * scale; 1620 Evas_Coord newY = currentY + (priv->view.offset.current.y - currentY) * scale; 1621 1621 Evas_Coord baseX = newX % tileWidth; 1622 1622 Evas_Coord baseY = newY % tileHeight; … … 1630 1630 } 1631 1631 1632 if (vrows > priv->view.rows || vcols > priv->view.col s)1632 if (vrows > priv->view.rows || vcols > priv->view.columns) 1633 1633 reCalculate = true; 1634 1634 … … 1671 1671 Eina_Inlist** iterator, **iteratorEnd; 1672 1672 Ewk_Tiled_Backing_Store_Item* item; 1673 Evas_Coord newX = priv->view.offset.cur .x;1674 Evas_Coord newY = priv->view.offset.cur .y;1673 Evas_Coord newX = priv->view.offset.current.x; 1674 Evas_Coord newY = priv->view.offset.current.y; 1675 1675 Evas_Coord baseX = priv->view.offset.base.x; 1676 1676 Evas_Coord baseY = priv->view.offset.base.y; … … 1700 1700 } 1701 1701 1702 priv->view.offset.cur .x = newX;1703 priv->view.offset.cur .y = newY;1702 priv->view.offset.current.x = newX; 1703 priv->view.offset.current.y = newY; 1704 1704 priv->view.offset.old.x = newX; 1705 1705 priv->view.offset.old.y = newY; … … 1819 1819 Ewk_Tile_Unused_Cache* tileUnusedCache = 0; 1820 1820 1821 priv->view.offset.cur .x = 0;1822 priv->view.offset.cur .y = 0;1821 priv->view.offset.current.x = 0; 1822 priv->view.offset.current.y = 0; 1823 1823 priv->view.offset.old.x = 0; 1824 1824 priv->view.offset.old.y = 0; … … 1960 1960 PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false); 1961 1961 Eina_Tile_Grid_Slicer slicer; 1962 const Eina_Tile_Grid_Info* info;1962 const Eina_Tile_Grid_Info* gridInfo; 1963 1963 Evas_Coord tileWidth, tileHeight; 1964 1964 Ewk_Tile_Unused_Cache* tileUnusedCache; … … 1974 1974 } 1975 1975 1976 while (eina_tile_grid_slicer_next(&slicer, & info)) {1977 const unsigned long c = info->col;1978 const unsigned long r = info->row;1979 if (!_ewk_tiled_backing_store_pre_render_request_add(priv, c , r, zoom))1976 while (eina_tile_grid_slicer_next(&slicer, &gridInfo)) { 1977 const unsigned long column = gridInfo->col; 1978 const unsigned long row = gridInfo->row; 1979 if (!_ewk_tiled_backing_store_pre_render_request_add(priv, column, row, zoom)) 1980 1980 break; 1981 1981 } … … 2001 2001 priv->model.base.row + priv->view.rows + n - 1); 2002 2002 endCol = std::min(priv->model.current.columns - 1, 2003 priv->model.base.column + priv->view.col s + n - 1);2003 priv->model.base.column + priv->view.columns + n - 1); 2004 2004 2005 2005 INF("startRow=%lu, endRow=%lu, startCol=%lu, endCol=%lu", -
trunk/Source/WebKit/efl/ewk/ewk_tiled_backing_store.h
r105240 r106904 63 63 64 64 struct _Ewk_Tile { 65 Eina_Tiler *updates; /**< updated/dirty areas */65 Eina_Tiler *updates; /**< updated/dirty areas */ 66 66 Ewk_Tile_Stats stats; /**< tile usage statistics */ 67 unsigned long col , row; /**< tile tile position */67 unsigned long column, row; /**< tile tile position */ 68 68 Evas_Coord x, y; /**< tile coordinate position */ 69 69 … … 77 77 */ 78 78 int visible; /**< visibility counter of this tile */ 79 Evas_Object *image; /**< Evas Image, the tile to be rendered */80 uint8_t *pixels;79 Evas_Object *image; /**< Evas Image, the tile to be rendered */ 80 uint8_t *pixels; 81 81 }; 82 82 … … 85 85 86 86 /* view */ 87 Evas_Object * ewk_tiled_backing_store_add(Evas*e);87 Evas_Object *ewk_tiled_backing_store_add(Evas *e); 88 88 89 void ewk_tiled_backing_store_render_cb_set(Evas_Object *o, Eina_Bool (*cb)(void * data, Ewk_Tile* t, const Eina_Rectangle* area), const void*data);89 void ewk_tiled_backing_store_render_cb_set(Evas_Object *o, Eina_Bool (*cb)(void *data, Ewk_Tile *t, const Eina_Rectangle *area), const void *data); 90 90 91 Eina_Bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object *o, Evas_Coord x, Evas_Coord y);92 Eina_Bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object *o, Evas_Coord dx, Evas_Coord dy);93 Eina_Bool ewk_tiled_backing_store_scroll_inner_offset_add(Evas_Object *o, Evas_Coord dx, Evas_Coord dy, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);91 Eina_Bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object *o, Evas_Coord x, Evas_Coord y); 92 Eina_Bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object *o, Evas_Coord dx, Evas_Coord dy); 93 Eina_Bool ewk_tiled_backing_store_scroll_inner_offset_add(Evas_Object *o, Evas_Coord dx, Evas_Coord dy, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); 94 94 95 Eina_Bool ewk_tiled_backing_store_zoom_set(Evas_Object * o, float* zoom, Evas_Coord cx, Evas_Coord cy, Evas_Coord* offx, Evas_Coord*offy);96 Eina_Bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy);97 void ewk_tiled_backing_store_fix_offsets(Evas_Object *o, Evas_Coord w, Evas_Coord h);98 void ewk_tiled_backing_store_zoom_weak_smooth_scale_set(Evas_Object *o, Eina_Bool smooth_scale);99 void ewk_tiled_backing_store_alpha_set(Evas_Object *o, Eina_Bool has_alpha);100 Eina_Bool ewk_tiled_backing_store_update(Evas_Object * o, const Eina_Rectangle*update);101 void ewk_tiled_backing_store_updates_process_pre_set(Evas_Object * o, void*(*cb)(void* data, Evas_Object *o), const void*data);102 void ewk_tiled_backing_store_updates_process_post_set(Evas_Object * o, void*(*cb)(void* data, void* pre_data, Evas_Object *o), const void*data);103 void ewk_tiled_backing_store_updates_process(Evas_Object *o);104 void ewk_tiled_backing_store_updates_clear(Evas_Object *o);105 void ewk_tiled_backing_store_contents_resize(Evas_Object *o, Evas_Coord width, Evas_Coord height);106 void ewk_tiled_backing_store_disabled_update_set(Evas_Object *o, Eina_Bool value);107 void ewk_tiled_backing_store_flush(Evas_Object *o);108 void ewk_tiled_backing_store_enable_scale_set(Evas_Object *o, Eina_Bool value);95 Eina_Bool ewk_tiled_backing_store_zoom_set(Evas_Object *o, float *zoom, Evas_Coord cx, Evas_Coord cy, Evas_Coord *offx, Evas_Coord *offy); 96 Eina_Bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy); 97 void ewk_tiled_backing_store_fix_offsets(Evas_Object *o, Evas_Coord w, Evas_Coord h); 98 void ewk_tiled_backing_store_zoom_weak_smooth_scale_set(Evas_Object *o, Eina_Bool smooth_scale); 99 void ewk_tiled_backing_store_alpha_set(Evas_Object *o, Eina_Bool has_alpha); 100 Eina_Bool ewk_tiled_backing_store_update(Evas_Object *o, const Eina_Rectangle *update); 101 void ewk_tiled_backing_store_updates_process_pre_set(Evas_Object *o, void*(*cb)(void *data, Evas_Object *o), const void *data); 102 void ewk_tiled_backing_store_updates_process_post_set(Evas_Object *o, void*(*cb)(void *data, void *pre_data, Evas_Object *o), const void *data); 103 void ewk_tiled_backing_store_updates_process(Evas_Object *o); 104 void ewk_tiled_backing_store_updates_clear(Evas_Object *o); 105 void ewk_tiled_backing_store_contents_resize(Evas_Object *o, Evas_Coord width, Evas_Coord height); 106 void ewk_tiled_backing_store_disabled_update_set(Evas_Object *o, Eina_Bool value); 107 void ewk_tiled_backing_store_flush(Evas_Object *o); 108 void ewk_tiled_backing_store_enable_scale_set(Evas_Object *o, Eina_Bool value); 109 109 110 Ewk_Tile_Unused_Cache * ewk_tiled_backing_store_tile_unused_cache_get(const Evas_Object*o);111 void ewk_tiled_backing_store_tile_unused_cache_set(Evas_Object * o, Ewk_Tile_Unused_Cache*tuc);110 Ewk_Tile_Unused_Cache *ewk_tiled_backing_store_tile_unused_cache_get(const Evas_Object *o); 111 void ewk_tiled_backing_store_tile_unused_cache_set(Evas_Object *o, Ewk_Tile_Unused_Cache *tuc); 112 112 113 Eina_Bool ewk_tiled_backing_store_pre_render_region(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom);114 Eina_Bool ewk_tiled_backing_store_pre_render_relative_radius(Evas_Object *o, unsigned int n, float zoom);115 Eina_Bool ewk_tiled_backing_store_pre_render_spiral_queue(Evas_Object * o, Eina_Rectangle* view_rect, Eina_Rectangle*render_rect, int max_memory, float zoom);116 void ewk_tiled_backing_store_pre_render_cancel(Evas_Object *o);113 Eina_Bool ewk_tiled_backing_store_pre_render_region(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom); 114 Eina_Bool ewk_tiled_backing_store_pre_render_relative_radius(Evas_Object *o, unsigned int n, float zoom); 115 Eina_Bool ewk_tiled_backing_store_pre_render_spiral_queue(Evas_Object *o, Eina_Rectangle* view_rect, Eina_Rectangle *render_rect, int max_memory, float zoom); 116 void ewk_tiled_backing_store_pre_render_cancel(Evas_Object *o); 117 117 118 Eina_Bool ewk_tiled_backing_store_disable_render(Evas_Object *o);119 Eina_Bool ewk_tiled_backing_store_enable_render(Evas_Object *o);118 Eina_Bool ewk_tiled_backing_store_disable_render(Evas_Object *o); 119 Eina_Bool ewk_tiled_backing_store_enable_render(Evas_Object *o); 120 120 #endif // ewk_tiled_backing_store_h -
trunk/Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp
r105240 r106904 45 45 Eina_Matrixsparse* matrix; 46 46 Eina_Inlist* matrices; 47 Ewk_Tile_Unused_Cache* til ieUnusedCache;47 Ewk_Tile_Unused_Cache* tileUnusedCache; 48 48 Evas_Colorspace cspace; 49 49 struct { … … 95 95 return; 96 96 97 ewk_tile_unused_cache_freeze(tileMatrix->til ieUnusedCache);97 ewk_tile_unused_cache_freeze(tileMatrix->tileUnusedCache); 98 98 99 99 if (tile->updates || tile->stats.full_update) … … 103 103 ERR("freeing cell that is visible, leaking tile %p", tile); 104 104 else { 105 if (!ewk_tile_unused_cache_tile_get(tileMatrix->til ieUnusedCache, tile))106 ERR("tile %p was not in cache %p? leaking...", tile, tileMatrix->til ieUnusedCache);105 if (!ewk_tile_unused_cache_tile_get(tileMatrix->tileUnusedCache, tile)) 106 ERR("tile %p was not in cache %p? leaking...", tile, tileMatrix->tileUnusedCache); 107 107 else { 108 108 Ewk_Tile_Matrix_Entry* entry; … … 122 122 } 123 123 124 ewk_tile_unused_cache_thaw(tileMatrix->til ieUnusedCache);124 ewk_tile_unused_cache_thaw(tileMatrix->tileUnusedCache); 125 125 } 126 126 … … 138 138 } 139 139 140 if (!eina_matrixsparse_cell_idx_get(entry->matrix, tile->row, tile->col , &cell)) {140 if (!eina_matrixsparse_cell_idx_get(entry->matrix, tile->row, tile->column, &cell)) { 141 141 142 142 ERR("removing tile %p that was not in the matrix? Leaking...", tile); … … 185 185 * freed/replaced by the cache. 186 186 * 187 * @param t uccache of unused tiles or @c 0 to create one187 * @param tileUnusedCache cache of unused tiles or @c 0 to create one 188 188 * automatically. 189 189 * @param columns number of columns in the matrix. … … 212 212 213 213 if (tileUnusedCache) 214 tileMatrix->til ieUnusedCache = ewk_tile_unused_cache_ref(tileUnusedCache);214 tileMatrix->tileUnusedCache = ewk_tile_unused_cache_ref(tileUnusedCache); 215 215 else { 216 tileMatrix->til ieUnusedCache = ewk_tile_unused_cache_new(DEFAULT_CACHE_SIZE);217 if (!tileMatrix->til ieUnusedCache) {216 tileMatrix->tileUnusedCache = ewk_tile_unused_cache_new(DEFAULT_CACHE_SIZE); 217 if (!tileMatrix->tileUnusedCache) { 218 218 ERR("no cache of unused tile!"); 219 219 eina_matrixsparse_free(tileMatrix->matrix); … … 299 299 EINA_SAFETY_ON_NULL_RETURN(tileMatrix); 300 300 301 ewk_tile_unused_cache_freeze(tileMatrix->til ieUnusedCache);301 ewk_tile_unused_cache_freeze(tileMatrix->tileUnusedCache); 302 302 ewk_tile_matrix_invalidate(tileMatrix); 303 303 entry = EINA_INLIST_CONTAINER_GET(tileMatrix->matrices, Ewk_Tile_Matrix_Entry); … … 307 307 tileMatrix->matrices = 0; 308 308 309 ewk_tile_unused_cache_thaw(tileMatrix->til ieUnusedCache);310 ewk_tile_unused_cache_unref(tileMatrix->til ieUnusedCache);309 ewk_tile_unused_cache_thaw(tileMatrix->tileUnusedCache); 310 ewk_tile_unused_cache_unref(tileMatrix->tileUnusedCache); 311 311 312 312 #ifdef DEBUG_MEM_LEAKS … … 356 356 { 357 357 EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, 0); 358 return tileMatrix->til ieUnusedCache;358 return tileMatrix->tileUnusedCache; 359 359 } 360 360 … … 391 391 end: 392 392 if (!tile->visible) { 393 if (!ewk_tile_unused_cache_tile_get(tileMatrix->til ieUnusedCache, tile))393 if (!ewk_tile_unused_cache_tile_get(tileMatrix->tileUnusedCache, tile)) 394 394 WRN("Ewk_Tile was unused but not in cache? bug!"); 395 395 } … … 460 460 } 461 461 462 tile->col = column;462 tile->column = column; 463 463 tile->row = row; 464 464 tile->x = column * tileWidth; … … 487 487 * 488 488 * @param tileMatrix the tile matrix to return tile to. 489 * @param t the tile instance to return, must @b not be @c 0.489 * @param tile the tile instance to return, must @b not be @c 0. 490 490 * @param last_used time in which tile.widthas last used. 491 491 * … … 501 501 502 502 tile->stats.last_used = lastUsed; 503 return ewk_tile_unused_cache_tile_put(tileMatrix->til ieUnusedCache, tile, _ewk_tile_matrix_tile_free, tileMatrix);503 return ewk_tile_unused_cache_tile_put(tileMatrix->tileUnusedCache, tile, _ewk_tile_matrix_tile_free, tileMatrix); 504 504 } 505 505 … … 707 707 } 708 708 printf("%3lu,%3lu %10p:", column, row, tile); 709 printf(" [%3lu,%3lu + %dx%d @ %0.3f]%c", tile->col , tile->row, tile->width, tile->height, tile->zoom, tile->visible ? '*' : ' ');709 printf(" [%3lu,%3lu + %dx%d @ %0.3f]%c", tile->column, tile->row, tile->width, tile->height, tile->zoom, tile->visible ? '*' : ' '); 710 710 printf("\n"); 711 711 } … … 715 715 eina_iterator_free(iterator); 716 716 717 ewk_tile_unused_cache_dbg(tileMatrix->til ieUnusedCache);717 ewk_tile_unused_cache_dbg(tileMatrix->tileUnusedCache); 718 718 } 719 719 … … 731 731 EINA_SAFETY_ON_NULL_RETURN(tileMatrix); 732 732 if (!tileMatrix->frozen) 733 ewk_tile_unused_cache_freeze(tileMatrix->til ieUnusedCache);733 ewk_tile_unused_cache_freeze(tileMatrix->tileUnusedCache); 734 734 tileMatrix->frozen++; 735 735 } … … 751 751 tileMatrix->frozen--; 752 752 if (!tileMatrix->frozen) 753 ewk_tile_unused_cache_thaw(tileMatrix->til ieUnusedCache);754 } 753 ewk_tile_unused_cache_thaw(tileMatrix->tileUnusedCache); 754 } -
trunk/Source/WebKit/efl/ewk/ewk_tiled_matrix.h
r100724 r106904 27 27 28 28 /* matrix of tiles */ 29 Ewk_Tile_Matrix * ewk_tile_matrix_new(Ewk_Tile_Unused_Cache* tileUnusedCache, unsigned long columns, unsigned long rows, float zoomLevel, Evas_Colorspace colorSpace, void (*render_callback)(void* data, Ewk_Tile* tile, const Eina_Rectangle* update), const void* renderData);30 void ewk_tile_matrix_free(Ewk_Tile_Matrix *tm);29 Ewk_Tile_Matrix *ewk_tile_matrix_new(Ewk_Tile_Unused_Cache *tuc, unsigned long cols, unsigned long rows, float zoom_level, Evas_Colorspace color_space, void (*render_callback)(void *data, Ewk_Tile *t, const Eina_Rectangle *update), const void *render_data); 30 void ewk_tile_matrix_free(Ewk_Tile_Matrix *tm); 31 31 32 void ewk_tile_matrix_resize(Ewk_Tile_Matrix *tm, unsigned long cols, unsigned long rows);33 void ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrix * tileMatrix, float zoom);34 void ewk_tile_matrix_invalidate(Ewk_Tile_Matrix * tileMatrix);32 void ewk_tile_matrix_resize(Ewk_Tile_Matrix *tm, unsigned long cols, unsigned long rows); 33 void ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrix *tm, float zoom); 34 void ewk_tile_matrix_invalidate(Ewk_Tile_Matrix *tm); 35 35 36 Ewk_Tile_Unused_Cache * ewk_tile_matrix_unused_cache_get(const Ewk_Tile_Matrix*tm);36 Ewk_Tile_Unused_Cache *ewk_tile_matrix_unused_cache_get(const Ewk_Tile_Matrix *tm); 37 37 38 Ewk_Tile * ewk_tile_matrix_tile_exact_get(Ewk_Tile_Matrix*tm, unsigned long col, unsigned long row, float zoom);39 Eina_Bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom);40 Ewk_Tile * ewk_tile_matrix_tile_nearest_get(Ewk_Tile_Matrix*tm, unsigned long col, unsigned long row, float zoom);41 Ewk_Tile * ewk_tile_matrix_tile_new(Ewk_Tile_Matrix* tm, Evas*evas, unsigned long col, unsigned long row, float zoom);42 Eina_Bool ewk_tile_matrix_tile_put(Ewk_Tile_Matrix * tm, Ewk_Tile*t, double last_used);38 Ewk_Tile *ewk_tile_matrix_tile_exact_get(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom); 39 Eina_Bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom); 40 Ewk_Tile *ewk_tile_matrix_tile_nearest_get(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom); 41 Ewk_Tile *ewk_tile_matrix_tile_new(Ewk_Tile_Matrix *tm, Evas *evas, unsigned long col, unsigned long row, float zoom); 42 Eina_Bool ewk_tile_matrix_tile_put(Ewk_Tile_Matrix *tm, Ewk_Tile *t, double last_used); 43 43 44 Eina_Bool ewk_tile_matrix_tile_update(Ewk_Tile_Matrix * tm, unsigned long col, unsigned long row, const Eina_Rectangle*update);45 Eina_Bool ewk_tile_matrix_tile_update_full(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row);46 void ewk_tile_matrix_tile_updates_clear(Ewk_Tile_Matrix * tm, Ewk_Tile*t);44 Eina_Bool ewk_tile_matrix_tile_update(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, const Eina_Rectangle *update); 45 Eina_Bool ewk_tile_matrix_tile_update_full(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row); 46 void ewk_tile_matrix_tile_updates_clear(Ewk_Tile_Matrix *tm, Ewk_Tile *t); 47 47 48 Eina_Bool ewk_tile_matrix_update(Ewk_Tile_Matrix * tm, const Eina_Rectangle*update, float zoom);49 void ewk_tile_matrix_updates_process(Ewk_Tile_Matrix *tm);50 void ewk_tile_matrix_updates_clear(Ewk_Tile_Matrix *tm);51 void ewk_tile_matrix_freeze(Ewk_Tile_Matrix *tm);52 void ewk_tile_matrix_thaw(Ewk_Tile_Matrix *tm);48 Eina_Bool ewk_tile_matrix_update(Ewk_Tile_Matrix *tm, const Eina_Rectangle *update, float zoom); 49 void ewk_tile_matrix_updates_process(Ewk_Tile_Matrix *tm); 50 void ewk_tile_matrix_updates_clear(Ewk_Tile_Matrix *tm); 51 void ewk_tile_matrix_freeze(Ewk_Tile_Matrix *tm); 52 void ewk_tile_matrix_thaw(Ewk_Tile_Matrix *tm); 53 53 54 54 // remove me! 55 void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix *tm);56 void ewk_tile_unused_cache_dbg(const Ewk_Tile_Unused_Cache *tuc);55 void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix *tm); 56 void ewk_tile_unused_cache_dbg(const Ewk_Tile_Unused_Cache *tuc); 57 57 void ewk_tile_accounting_dbg(); 58 58 59 60 59 #endif // ewk_tiled_matrix_h 61 -
trunk/Source/WebKit/efl/ewk/ewk_tiled_model.cpp
r104908 r106904 346 346 #ifdef TILE_STATS_ACCOUNT_RENDER_TIME 347 347 struct timeval timev; 348 double render _start;348 double renderStartTime; 349 349 gettimeofday(&timev, 0); 350 render _startile = (double)timev.tv_sec +350 renderStartTime = (double)timev.tv_sec + 351 351 (((double)timev.tv_usec) / 1000000); 352 352 #endif … … 355 355 gettimeofday(&timev, 0); 356 356 tile->stats.render_time = (double)timev.tv_sec + 357 (((double)timev.tv_usec) / 1000000) - render _start;357 (((double)timev.tv_usec) / 1000000) - renderStartTime; 358 358 #endif 359 359 } else if (tile->updates) { … … 521 521 522 522 /** 523 * heightold reference to cache.523 * Hold reference to cache. 524 524 * 525 525 * @return same pointer as taken. … … 631 631 * 632 632 * Maintenance tasks optimize cache usage, but maybe we know we should 633 * h eightold on them until we do the last operation, in this case we freeze633 * hold on them until we do the last operation, in this case we freeze 634 634 * while operating and then thaw when we're done. 635 635 * … … 708 708 * 709 709 * @param tileUnusedCache cache of unused tiles 710 * @param t tile to be added to cache.711 * @param tile _free_cbfunction used to free tiles.710 * @param tile tile to be added to cache. 711 * @param tileFreeCallback function used to free tiles. 712 712 * @param data context to give back to @a tile_free_cb as first argument. 713 713 * … … 717 717 * @see ewk_tile_unused_cache_auto_flush() 718 718 */ 719 Eina_Bool ewk_tile_unused_cache_tile_put(Ewk_Tile_Unused_Cache* tileUnusedCache, Ewk_Tile* tile, void (* tileFreeC b)(void* data, Ewk_Tile* tile), const void* data)719 Eina_Bool ewk_tile_unused_cache_tile_put(Ewk_Tile_Unused_Cache* tileUnusedCache, Ewk_Tile* tile, void (* tileFreeCallback)(void* data, Ewk_Tile* tile), const void* data) 720 720 { 721 721 Ewk_Tile_Unused_Cache_Entry* unusedCacheEntry; … … 738 738 unusedCacheEntry->tile = tile; 739 739 unusedCacheEntry->weight = 0; /* calculated just before sort */ 740 unusedCacheEntry->tile_free.callback = tileFreeC b;740 unusedCacheEntry->tile_free.callback = tileFreeCallback; 741 741 unusedCacheEntry->tile_free.data = (void*)data; 742 742 … … 759 759 const Ewk_Tile* tile = static_cast<Ewk_Tile_Unused_Cache_Entry*>(item)->tile; 760 760 printf(" [%3lu,%3lu + %dx%d @ %0.3f]%c", 761 tile->col , tile->row, tile->width, tile->height, tile->zoom,761 tile->column, tile->row, tile->width, tile->height, tile->zoom, 762 762 tile->visible ? '*' : ' '); 763 763 -
trunk/Source/WebKit/efl/ewk/ewk_tiled_model.h
r99252 r106904 27 27 28 28 /* model */ 29 Ewk_Tile * ewk_tile_new(Evas*evas, Evas_Coord w, Evas_Coord h, float zoom, Evas_Colorspace cspace);30 void ewk_tile_free(Ewk_Tile *t);31 void ewk_tile_unused_cache_clear(Ewk_Tile_Unused_Cache *tuc);32 void ewk_tile_show(Ewk_Tile *t);33 void ewk_tile_hide(Ewk_Tile *t);34 size_t ewk_tile_memory_size_get(const Ewk_Tile *t);35 Eina_Bool ewk_tile_visible_get(Ewk_Tile *t);36 void ewk_tile_update_full(Ewk_Tile *t);37 void ewk_tile_update_area(Ewk_Tile * t, const Eina_Rectangle*r);38 void ewk_tile_updates_process(Ewk_Tile * t, void (*cb)(void* data, Ewk_Tile* t, const Eina_Rectangle* update), const void*data);39 void ewk_tile_updates_clear(Ewk_Tile *t);29 Ewk_Tile *ewk_tile_new(Evas *evas, Evas_Coord w, Evas_Coord h, float zoom, Evas_Colorspace cspace); 30 void ewk_tile_free(Ewk_Tile *t); 31 void ewk_tile_unused_cache_clear(Ewk_Tile_Unused_Cache *tuc); 32 void ewk_tile_show(Ewk_Tile *t); 33 void ewk_tile_hide(Ewk_Tile *t); 34 size_t ewk_tile_memory_size_get(const Ewk_Tile *t); 35 Eina_Bool ewk_tile_visible_get(Ewk_Tile *t); 36 void ewk_tile_update_full(Ewk_Tile *t); 37 void ewk_tile_update_area(Ewk_Tile *t, const Eina_Rectangle *r); 38 void ewk_tile_updates_process(Ewk_Tile *t, void (*cb)(void *data, Ewk_Tile *t, const Eina_Rectangle *update), const void *data); 39 void ewk_tile_updates_clear(Ewk_Tile *t); 40 40 41 41 /* cache of unused tiles */ 42 Ewk_Tile_Unused_Cache *ewk_tile_unused_cache_new(size_t max);43 void ewk_tile_unused_cache_lock_area(Ewk_Tile_Unused_Cache *tuc, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom);44 void ewk_tile_unused_cache_unlock_area(Ewk_Tile_Unused_Cache *tuc);45 Ewk_Tile_Unused_Cache * ewk_tile_unused_cache_ref(Ewk_Tile_Unused_Cache*tuc);46 void ewk_tile_unused_cache_unref(Ewk_Tile_Unused_Cache *tuc);42 Ewk_Tile_Unused_Cache *ewk_tile_unused_cache_new(size_t max); 43 void ewk_tile_unused_cache_lock_area(Ewk_Tile_Unused_Cache *tuc, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom); 44 void ewk_tile_unused_cache_unlock_area(Ewk_Tile_Unused_Cache *tuc); 45 Ewk_Tile_Unused_Cache *ewk_tile_unused_cache_ref(Ewk_Tile_Unused_Cache *tuc); 46 void ewk_tile_unused_cache_unref(Ewk_Tile_Unused_Cache *tuc); 47 47 48 void ewk_tile_unused_cache_dirty(Ewk_Tile_Unused_Cache *tuc);48 void ewk_tile_unused_cache_dirty(Ewk_Tile_Unused_Cache *tuc); 49 49 50 void ewk_tile_unused_cache_freeze(Ewk_Tile_Unused_Cache *tuc);51 void ewk_tile_unused_cache_thaw(Ewk_Tile_Unused_Cache *tuc);50 void ewk_tile_unused_cache_freeze(Ewk_Tile_Unused_Cache *tuc); 51 void ewk_tile_unused_cache_thaw(Ewk_Tile_Unused_Cache *tuc); 52 52 53 Eina_Bool ewk_tile_unused_cache_tile_get(Ewk_Tile_Unused_Cache * tuc, Ewk_Tile*t);54 Eina_Bool ewk_tile_unused_cache_tile_put(Ewk_Tile_Unused_Cache * tuc, Ewk_Tile* t, void (* tile_free_cb)(void* data, Ewk_Tile* t), const void*data);53 Eina_Bool ewk_tile_unused_cache_tile_get(Ewk_Tile_Unused_Cache *tuc, Ewk_Tile *t); 54 Eina_Bool ewk_tile_unused_cache_tile_put(Ewk_Tile_Unused_Cache *tuc, Ewk_Tile *t, void (* tile_free_cb)(void *data, Ewk_Tile *t), const void *data); 55 55 56 56 #endif // ewk_tiled_model_h 57 -
trunk/Source/WebKit/efl/ewk/ewk_util.h
r95901 r106904 30 30 #include <cairo.h> 31 31 32 Evas_Object * ewk_util_image_from_cairo_surface_add(Evas* canvas, cairo_surface_t*surface);32 Evas_Object *ewk_util_image_from_cairo_surface_add(Evas *canvas, cairo_surface_t *surface); 33 33 34 34 #endif // ewk_util_h -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r106772 r106904 217 217 #define EWK_VIEW_TYPE_CHECK(ewkView, ...) do { } while (0) 218 218 #else 219 #define EWK_VIEW_TYPE_CHECK(ewkView, ...) 220 do { 221 const char* _tmp_otype = evas_object_type_get(ewkView); 222 const Evas_Smart* _tmp_s = evas_object_smart_smart_get(ewkView); 223 if (EINA_UNLIKELY(!_tmp_s)) { 224 EINA_LOG_CRIT 225 ("%p (%s) is not a smart object!", ewkView, 226 _tmp_otype ? _tmp_otype : "(null)"); 227 return __VA_ARGS__; 228 } 219 #define EWK_VIEW_TYPE_CHECK(ewkView, ...) \ 220 do { \ 221 const char* _tmp_otype = evas_object_type_get(ewkView); \ 222 const Evas_Smart* _tmp_s = evas_object_smart_smart_get(ewkView); \ 223 if (EINA_UNLIKELY(!_tmp_s)) { \ 224 EINA_LOG_CRIT \ 225 ("%p (%s) is not a smart object!", ewkView, \ 226 _tmp_otype ? _tmp_otype : "(null)"); \ 227 return __VA_ARGS__; \ 228 } \ 229 229 const Evas_Smart_Class* _tmp_sc = evas_smart_class_get(_tmp_s); \ 230 if (EINA_UNLIKELY(!_tmp_sc)) { 231 EINA_LOG_CRIT 232 ("%p (%s) is not a smart object!", ewkView, 233 _tmp_otype ? _tmp_otype : "(null)"); 234 return __VA_ARGS__; 235 } 236 if (EINA_UNLIKELY(_tmp_sc->data != ewkViewTypeString)) { 237 EINA_LOG_CRIT 238 ("%p (%s) is not of an ewk_view (need %p, got %p)!", 239 ewkView, _tmp_otype ? _tmp_otype : "(null)", 240 ewkViewTypeString, _tmp_sc->data); 241 return __VA_ARGS__; 242 } 230 if (EINA_UNLIKELY(!_tmp_sc)) { \ 231 EINA_LOG_CRIT \ 232 ("%p (%s) is not a smart object!", ewkView, \ 233 _tmp_otype ? _tmp_otype : "(null)"); \ 234 return __VA_ARGS__; \ 235 } \ 236 if (EINA_UNLIKELY(_tmp_sc->data != ewkViewTypeString)) { \ 237 EINA_LOG_CRIT \ 238 ("%p (%s) is not of an ewk_view (need %p, got %p)!", \ 239 ewkView, _tmp_otype ? _tmp_otype : "(null)", \ 240 ewkViewTypeString, _tmp_sc->data); \ 241 return __VA_ARGS__; \ 242 } \ 243 243 } while (0) 244 244 #endif 245 245 246 #define EWK_VIEW_SD_GET(ewkView, p tr)\247 Ewk_View_Smart_Data* p tr = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkView))248 249 #define EWK_VIEW_SD_GET_OR_RETURN(ewkView, p tr, ...)\250 EWK_VIEW_TYPE_CHECK(ewkView, __VA_ARGS__); 251 EWK_VIEW_SD_GET(ewkView, p tr);\252 if (!p tr) {\253 CRITICAL("no smart data for object %p (%s)", 254 ewkView, evas_object_type_get(ewkView)); 255 return __VA_ARGS__; 256 } 257 258 #define EWK_VIEW_PRIV_GET(smartData, p tr)\259 Ewk_View_Private_Data *ptr = smartData->_priv260 261 #define EWK_VIEW_PRIV_GET_OR_RETURN(smartData, p tr, ...)\262 EWK_VIEW_PRIV_GET(smartData, p tr);\263 if (!p tr) {\264 CRITICAL("no private data for object %p (%s)", 265 smartData->self, evas_object_type_get(smartData->self)); 266 return __VA_ARGS__; 246 #define EWK_VIEW_SD_GET(ewkView, pointer) \ 247 Ewk_View_Smart_Data* pointer = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkView)) 248 249 #define EWK_VIEW_SD_GET_OR_RETURN(ewkView, pointer, ...) \ 250 EWK_VIEW_TYPE_CHECK(ewkView, __VA_ARGS__); \ 251 EWK_VIEW_SD_GET(ewkView, pointer); \ 252 if (!pointer) { \ 253 CRITICAL("no smart data for object %p (%s)", \ 254 ewkView, evas_object_type_get(ewkView)); \ 255 return __VA_ARGS__; \ 256 } 257 258 #define EWK_VIEW_PRIV_GET(smartData, pointer) \ 259 Ewk_View_Private_Data* pointer = smartData->_priv 260 261 #define EWK_VIEW_PRIV_GET_OR_RETURN(smartData, pointer, ...) \ 262 EWK_VIEW_PRIV_GET(smartData, pointer); \ 263 if (!pointer) { \ 264 CRITICAL("no private data for object %p (%s)", \ 265 smartData->self, evas_object_type_get(smartData->self)); \ 266 return __VA_ARGS__; \ 267 267 } 268 268 … … 411 411 { 412 412 EWK_VIEW_PRIV_GET(smartData, priv); 413 WebCore::FocusController* f c= priv->page->focusController();414 DBG("ewkView=%p, f c=%p", smartData->self, fc);415 EINA_SAFETY_ON_NULL_RETURN_VAL(f c, false);416 417 f c->setActive(true);418 f c->setFocused(true);413 WebCore::FocusController* focusController = priv->page->focusController(); 414 DBG("ewkView=%p, focusController=%p", smartData->self, focusController); 415 EINA_SAFETY_ON_NULL_RETURN_VAL(focusController, false); 416 417 focusController->setActive(true); 418 focusController->setFocused(true); 419 419 return true; 420 420 } … … 996 996 static Eina_Bool _ewk_view_smart_pre_render_region(Ewk_View_Smart_Data* smartData, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom) 997 997 { 998 WRN("not supported by engine. smartD Ata=%p area=%d,%d+%dx%d, zoom=%f",998 WRN("not supported by engine. smartData=%p area=%d,%d+%dx%d, zoom=%f", 999 999 smartData, x, y, width, height, zoom); 1000 1000 return false; … … 1792 1792 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false); 1793 1793 EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->api->pre_render_region, false); 1794 float cur _zoom;1794 float currentZoom; 1795 1795 Evas_Coord contentsWidth, contentsHeight; 1796 1796 … … 1801 1801 return false; 1802 1802 1803 cur _zoom = ewk_frame_page_zoom_get(smartData->main_frame);1804 1805 if (cur _zoom < 0.00001)1803 currentZoom = ewk_frame_page_zoom_get(smartData->main_frame); 1804 1805 if (currentZoom < 0.00001) 1806 1806 return false; 1807 1807 if (!ewk_frame_contents_size_get(smartData->main_frame, &contentsWidth, &contentsHeight)) 1808 1808 return false; 1809 1809 1810 contentsWidth *= zoom / cur _zoom;1811 contentsHeight *= zoom / cur _zoom;1810 contentsWidth *= zoom / currentZoom; 1811 contentsHeight *= zoom / currentZoom; 1812 1812 DBG("region %d,%d+%dx%d @ %f contents=%dx%d", x, y, width, height, zoom, contentsWidth, contentsHeight); 1813 1813 … … 2959 2959 * @param javascript @c true if the new window is originated from javascript, 2960 2960 * @c false otherwise 2961 * @param wi dthindow_features Features of the new window being created. If it's @c2962 * NULL, it will be created a window with default features.2961 * @param window_features Features of the new window being created. If it's @c 2962 * 0, it will be created a window with default features. 2963 2963 * 2964 2964 * @return New view, in case smart class implements the creation of new windows; … … 3052 3052 void ewk_view_toolbars_visible_get(Evas_Object* ewkView, bool* visible) 3053 3053 { 3054 DBG("%s, o=%p", __func__, ewkView);3054 DBG("%s, ewkView=%p", __func__, ewkView); 3055 3055 *visible = false; 3056 3056 evas_object_smart_callback_call(ewkView, "toolbars,visible,get", visible); … … 3085 3085 void ewk_view_statusbar_visible_get(Evas_Object* ewkView, bool* visible) 3086 3086 { 3087 DBG("%s, o=%p", __func__, ewkView);3087 DBG("%s, ewkView=%p", __func__, ewkView); 3088 3088 *visible = false; 3089 3089 evas_object_smart_callback_call(ewkView, "statusbar,visible,get", visible); … … 3134 3134 void ewk_view_scrollbars_visible_get(Evas_Object* ewkView, bool* visible) 3135 3135 { 3136 DBG("%s, o=%p", __func__, ewkView);3136 DBG("%s, ewkView=%p", __func__, ewkView); 3137 3137 *visible = false; 3138 3138 evas_object_smart_callback_call(ewkView, "scrollbars,visible,get", visible); … … 3167 3167 void ewk_view_menubar_visible_get(Evas_Object* ewkView, bool* visible) 3168 3168 { 3169 DBG("%s, o=%p", __func__, ewkView);3169 DBG("%s, ewkView=%p", __func__, ewkView); 3170 3170 *visible = false; 3171 3171 evas_object_smart_callback_call(ewkView, "menubar,visible,get", visible); … … 3595 3595 3596 3596 if (maxScale < minScale) { 3597 WRN("min _scale is larger than max_scale");3597 WRN("minScale is larger than maxScale"); 3598 3598 return false; 3599 3599 } -
trunk/Source/WebKit/efl/ewk/ewk_view.h
r105152 r106904 1443 1443 * @c EINA_FALSE if not or on failure 1444 1444 */ 1445 EAPI Eina_Bool ewk_view_setting_enable_frame_flattening_get(const Evas_Object *o);1445 EAPI Eina_Bool ewk_view_setting_enable_frame_flattening_get(const Evas_Object *o); 1446 1446 1447 1447 /** … … 1454 1454 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure 1455 1455 */ 1456 EAPI Eina_Bool ewk_view_setting_enable_frame_flattening_set(Evas_Object *o, Eina_Bool enable);1456 EAPI Eina_Bool ewk_view_setting_enable_frame_flattening_set(Evas_Object *o, Eina_Bool enable); 1457 1457 1458 1458 /** … … 2289 2289 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. 2290 2290 */ 2291 EAPI Eina_Bool ewk_view_visibility_state_set(Evas_Object *o, Ewk_Page_Visibility_State page_visible_state, Eina_Bool initial_state);2291 EAPI Eina_Bool ewk_view_visibility_state_set(Evas_Object *o, Ewk_Page_Visibility_State page_visible_state, Eina_Bool initial_state); 2292 2292 2293 2293 /** -
trunk/Source/WebKit/efl/ewk/ewk_view_single.cpp
r106424 r106904 10 10 This library is distributed in the hope that it will be useful, 11 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MER chANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 13 Library General Public License for more details. 14 14 … … 217 217 void* pixels; 218 218 Eina_Rectangle* rect; 219 const Eina_Rectangle* p r;220 const Eina_Rectangle* p r_end;219 const Eina_Rectangle* paintRequest; 220 const Eina_Rectangle* paintRequestEnd; 221 221 Eina_Tiler* tiler; 222 222 Eina_Iterator* iterator; … … 285 285 ewk_view_layout_if_needed_recursive(smartData->_priv); 286 286 287 p r= ewk_view_repaints_pop(smartData->_priv, &count);288 p r_end = pr+ count;289 for (; p r < pr_end; pr++)290 eina_tiler_rect_add(tiler, p r);287 paintRequest = ewk_view_repaints_pop(smartData->_priv, &count); 288 paintRequestEnd = paintRequest + count; 289 for (; paintRequest < paintRequestEnd; paintRequest++) 290 eina_tiler_rect_add(tiler, paintRequest); 291 291 292 292 iterator = eina_tiler_iterator_new(tiler); -
trunk/Source/WebKit/efl/ewk/ewk_view_tiled.cpp
r106330 r106904 78 78 static Evas_Object* _ewk_view_tiled_smart_backing_store_add(Ewk_View_Smart_Data* smartData) 79 79 { 80 Evas_Object* b s= ewk_tiled_backing_store_add(smartData->base.evas);80 Evas_Object* backingStore = ewk_tiled_backing_store_add(smartData->base.evas); 81 81 ewk_tiled_backing_store_render_cb_set 82 (b s, _ewk_view_tiled_render_cb, smartData->_priv);82 (backingStore, _ewk_view_tiled_render_cb, smartData->_priv); 83 83 ewk_tiled_backing_store_updates_process_pre_set 84 (b s, _ewk_view_tiled_updates_process_pre, smartData->_priv);85 return b s;84 (backingStore, _ewk_view_tiled_updates_process_pre, smartData->_priv); 85 return backingStore; 86 86 } 87 87 … … 98 98 static void _ewk_view_tiled_smart_add(Evas_Object* ewkView) 99 99 { 100 Ewk_View_Smart_Data* s d;100 Ewk_View_Smart_Data* smartData; 101 101 102 102 _parent_sc.sc.add(ewkView); 103 103 104 s d= static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkView));105 if (!s d)104 smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkView)); 105 if (!smartData) 106 106 return; 107 107 108 108 evas_object_smart_callback_add( 109 s d->main_frame, "contents,size,changed",110 _ewk_view_tiled_contents_size_changed_cb, s d);109 smartData->main_frame, "contents,size,changed", 110 _ewk_view_tiled_contents_size_changed_cb, smartData); 111 111 } 112 112 … … 393 393 Ewk_Tile_Unused_Cache* ewk_view_tiled_unused_cache_get(const Evas_Object* ewkView) 394 394 { 395 Ewk_View_Smart_Data* s d= ewk_view_smart_data_get(ewkView);396 EINA_SAFETY_ON_NULL_RETURN_VAL(s d, 0);397 return ewk_tiled_backing_store_tile_unused_cache_get(s d->backing_store);395 Ewk_View_Smart_Data* smartData = ewk_view_smart_data_get(ewkView); 396 EINA_SAFETY_ON_NULL_RETURN_VAL(smartData, 0); 397 return ewk_tiled_backing_store_tile_unused_cache_get(smartData->backing_store); 398 398 } 399 399 400 400 void ewk_view_tiled_unused_cache_set(Evas_Object* ewkView, Ewk_Tile_Unused_Cache* cache) 401 401 { 402 Ewk_View_Smart_Data* s d= ewk_view_smart_data_get(ewkView);403 EINA_SAFETY_ON_NULL_RETURN(s d);404 ewk_tiled_backing_store_tile_unused_cache_set(s d->backing_store, cache);405 } 402 Ewk_View_Smart_Data* smartData = ewk_view_smart_data_get(ewkView); 403 EINA_SAFETY_ON_NULL_RETURN(smartData); 404 ewk_tiled_backing_store_tile_unused_cache_set(smartData->backing_store, cache); 405 }
Note: See TracChangeset
for help on using the changeset viewer.