Changeset 73924 in webkit
- Timestamp:
- Dec 13, 2010 9:56:46 AM (13 years ago)
- Location:
- trunk/WebKit/efl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/efl/ChangeLog
r73886 r73924 1 2010-12-13 Alex Bredariol Grilo <abgrilo@profusion.mobi> 2 3 Reviewed by Andreas Kling. 4 5 Remove one row/column of renderers. 6 https://bugs.webkit.org/show_bug.cgi?id=50456 7 8 This changes the algorithm in a way that it will require one less column 9 and row of renderers to fill the viewport. The direct result of this is 10 that now less tiles need to be rendered at once when displaying the 11 viewport. 12 13 * ewk/ewk_tiled_backing_store.c: 14 (_ewk_tiled_backing_store_smart_add): 15 (_ewk_tiled_backing_store_recalc_renderers): 16 (_ewk_tiled_backing_store_view_wrap_up): 17 (_ewk_tiled_backing_store_view_wrap_down): 18 (_ewk_tiled_backing_store_view_wrap_left): 19 (_ewk_tiled_backing_store_view_wrap_right): 20 (_ewk_tiled_backing_store_smart_calculate_offset_force): 21 (_ewk_tiled_backing_store_smart_calculate_offset): 22 (_ewk_tiled_backing_store_smart_calculate): 23 (_ewk_tiled_backing_store_zoom_set_internal): 24 (ewk_tiled_backing_store_zoom_weak_set): 25 (ewk_tiled_backing_store_fix_offsets): 26 (ewk_tiled_backing_store_flush): 27 1 28 2010-10-28 MORITA Hajime <morrita@google.com> 2 29 -
trunk/WebKit/efl/ewk/ewk_tiled_backing_store.c
r72579 r73924 915 915 priv->view.offset.old.x = 0; 916 916 priv->view.offset.old.y = 0; 917 priv->view.offset.base.x = -TILE_W;918 priv->view.offset.base.y = -TILE_H;919 920 priv->model.base.col = -1;921 priv->model.base.row = -1;917 priv->view.offset.base.x = 0; 918 priv->view.offset.base.y = 0; 919 920 priv->model.base.col = 0; 921 priv->model.base.row = 0; 922 922 priv->model.cur.cols = 1; 923 923 priv->model.cur.rows = 1; … … 1023 1023 INF("o=%p, new size: %dx%d", priv->self, w, h); 1024 1024 1025 cols = 2+ (int)ceil((float)w / (float)tw);1026 rows = 2+ (int)ceil((float)h / (float)th);1025 cols = 1 + (int)ceil((float)w / (float)tw); 1026 rows = 1 + (int)ceil((float)h / (float)th); 1027 1027 1028 1028 INF("o=%p new grid size cols: %ld, rows: %ld, was %ld, %ld", … … 1159 1159 Evas_Coord tw = priv->view.tile.w; 1160 1160 Evas_Coord th = priv->view.tile.h; 1161 Evas_Coord off_y = (priv->view.offset.base.y % th) -th;1161 Evas_Coord off_y = priv->view.offset.base.y + count * th; 1162 1162 Evas_Coord oy = y + (last_row - count + 1) * th + off_y; 1163 1163 Eina_Inlist **itr_start, **itr_end; … … 1206 1206 Evas_Coord tw = priv->view.tile.w; 1207 1207 Evas_Coord th = priv->view.tile.h; 1208 Evas_Coord off_y = (priv->view.offset.base.y % th) -th;1208 Evas_Coord off_y = priv->view.offset.base.y - count * th; 1209 1209 Evas_Coord oy = y + off_y + (count - 1) * th; 1210 1210 Eina_Inlist **itr_start, **itr_end; … … 1254 1254 Evas_Coord tw = priv->view.tile.w; 1255 1255 Evas_Coord th = priv->view.tile.h; 1256 Evas_Coord off_x = (priv->view.offset.base.x % tw) -tw;1256 Evas_Coord off_x = priv->view.offset.base.x + count * tw; 1257 1257 Evas_Coord oy = y + priv->view.offset.base.y; 1258 1258 Eina_Inlist **itr; … … 1301 1301 Evas_Coord tw = priv->view.tile.w; 1302 1302 Evas_Coord th = priv->view.tile.h; 1303 Evas_Coord off_x = (priv->view.offset.base.x % tw) -tw;1303 Evas_Coord off_x = priv->view.offset.base.x - count * tw; 1304 1304 Evas_Coord oy = y + priv->view.offset.base.y; 1305 1305 Eina_Inlist **itr, **itr_end; … … 1403 1403 th = priv->view.tile.h; 1404 1404 1405 step_x = (dx + priv->view.offset.base.x + tw) / tw; 1406 step_y = (dy + priv->view.offset.base.y + th) / th; 1405 long new_col = -priv->view.offset.cur.x / tw; 1406 step_x = priv->model.base.col - new_col; 1407 long new_row = -priv->view.offset.cur.y / th; 1408 step_y = priv->model.base.row - new_row; 1407 1409 1408 1410 priv->view.offset.old.x = priv->view.offset.cur.x; … … 1436 1438 th = priv->view.tile.h; 1437 1439 1438 step_x = (dx + priv->view.offset.base.x + tw) / tw; 1439 step_y = (dy + priv->view.offset.base.y + th) / th; 1440 long new_col = -priv->view.offset.cur.x / tw; 1441 step_x = priv->model.base.col - new_col; 1442 long new_row = -priv->view.offset.cur.y / th; 1443 step_y = priv->model.base.row - new_row; 1440 1444 1441 1445 priv->view.offset.old.x = priv->view.offset.cur.x; … … 1570 1574 _ewk_tiled_backing_store_updates_process(priv); 1571 1575 1572 if (priv->view.offset.base.x > =01573 || priv->view.offset.base.x <= - 2 *priv->view.tile.w1574 || priv->view.offset.base.y > =01575 || priv->view.offset.base.y <= - 2 *priv->view.tile.h)1576 if (priv->view.offset.base.x > 0 1577 || priv->view.offset.base.x <= - priv->view.tile.w 1578 || priv->view.offset.base.y > 0 1579 || priv->view.offset.base.y <= - priv->view.tile.h) 1576 1580 ERR("incorrect base offset %+4d,%+4d, tile=%dx%d, cur=%+4d,%+4d\n", 1577 1581 priv->view.offset.base.x, priv->view.offset.base.y, … … 1701 1705 1702 1706 if (!priv->view.w || !priv->view.h) { 1703 priv->view.offset.base.x = -tw;1704 priv->view.offset.base.y = -th;1707 priv->view.offset.base.x = 0; 1708 priv->view.offset.base.y = 0; 1705 1709 return EINA_TRUE; 1706 1710 } … … 1726 1730 new_y = -model_height + priv->view.h; 1727 1731 1728 bx = new_x % tw - tw;1729 priv->model.base.col = - new_x / tw - 1;1730 by = new_y % th - th;1731 priv->model.base.row = - new_y / th - 1;1732 bx = new_x % tw; 1733 priv->model.base.col = - new_x / tw; 1734 by = new_y % th; 1735 priv->model.base.row = - new_y / th; 1732 1736 1733 1737 priv->changed.size = EINA_TRUE; … … 1805 1809 model_width, model_height); 1806 1810 1807 int vrows = ceil((float)priv->view.h / (float)th) + 2;1808 int vcols = ceil((float)priv->view.w / (float)tw) + 2;1811 int vrows = ceil((float)priv->view.h / (float)th) + 1; 1812 int vcols = ceil((float)priv->view.w / (float)tw) + 1; 1809 1813 Evas_Coord new_x = cx + (priv->view.offset.cur.x - cx) * scale; 1810 1814 Evas_Coord new_y = cy + (priv->view.offset.cur.y - cy) * scale; 1811 Evas_Coord bx = new_x % tw - tw;1812 Evas_Coord by = new_y % th - th;1813 unsigned long base_row = -new_y / th - 1;1814 unsigned long base_col = -new_x / tw - 1;1815 Evas_Coord bx = new_x % tw; 1816 Evas_Coord by = new_y % th; 1817 unsigned long base_row = -new_y / th; 1818 unsigned long base_col = -new_x / tw; 1815 1819 1816 1820 if (base_row != priv->model.base.row || base_col != priv->model.base.col) { … … 1870 1874 if (-new_x > w) { 1871 1875 new_x = -w; 1872 bx = new_x % tw - tw;1873 priv->model.base.col = -new_x / tw - 1;1876 bx = new_x % tw; 1877 priv->model.base.col = -new_x / tw; 1874 1878 } 1875 1879 1876 1880 if (-new_y > h) { 1877 1881 new_y = -h; 1878 by = new_y % th - th;1879 priv->model.base.row = -new_y / th - 1;1882 by = new_y % th; 1883 priv->model.base.row = -new_y / th; 1880 1884 } 1881 1885 1882 1886 if (bx >= 0 || bx <= -2 * priv->view.tile.w) { 1883 bx = new_x % tw - tw;1884 priv->model.base.col = -new_x / tw - 1;1887 bx = new_x % tw; 1888 priv->model.base.col = -new_x / tw; 1885 1889 } 1886 1890 1887 1891 if (by >= 0 || by <= -2 * priv->view.tile.h) { 1888 by = new_y % th - th;1889 priv->model.base.row = -new_y / th - 1;1892 by = new_y % th; 1893 priv->model.base.row = -new_y / th; 1890 1894 } 1891 1895 … … 2007 2011 priv->view.offset.old.x = 0; 2008 2012 priv->view.offset.old.y = 0; 2009 priv->view.offset.base.x = -priv->view.tile.w;2010 priv->view.offset.base.y = -priv->view.tile.h;2011 priv->model.base.col = -1;2012 priv->model.base.row = -1;2013 priv->view.offset.base.x = 0; 2014 priv->view.offset.base.y = 0; 2015 priv->model.base.col = 0; 2016 priv->model.base.row = 0; 2013 2017 priv->changed.size = EINA_TRUE; 2014 2018
Note: See TracChangeset
for help on using the changeset viewer.