Changeset 73924 in webkit


Ignore:
Timestamp:
Dec 13, 2010 9:56:46 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-12-13 Alex Bredariol Grilo <abgrilo@profusion.mobi>

Reviewed by Andreas Kling.

Remove one row/column of renderers.
https://bugs.webkit.org/show_bug.cgi?id=50456

This changes the algorithm in a way that it will require one less column
and row of renderers to fill the viewport. The direct result of this is
that now less tiles need to be rendered at once when displaying the
viewport.

  • ewk/ewk_tiled_backing_store.c: (_ewk_tiled_backing_store_smart_add): (_ewk_tiled_backing_store_recalc_renderers): (_ewk_tiled_backing_store_view_wrap_up): (_ewk_tiled_backing_store_view_wrap_down): (_ewk_tiled_backing_store_view_wrap_left): (_ewk_tiled_backing_store_view_wrap_right): (_ewk_tiled_backing_store_smart_calculate_offset_force): (_ewk_tiled_backing_store_smart_calculate_offset): (_ewk_tiled_backing_store_smart_calculate): (_ewk_tiled_backing_store_zoom_set_internal): (ewk_tiled_backing_store_zoom_weak_set): (ewk_tiled_backing_store_fix_offsets): (ewk_tiled_backing_store_flush):
Location:
trunk/WebKit/efl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/efl/ChangeLog

    r73886 r73924  
     12010-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
    1282010-10-28  MORITA Hajime  <morrita@google.com>
    229
  • trunk/WebKit/efl/ewk/ewk_tiled_backing_store.c

    r72579 r73924  
    915915    priv->view.offset.old.x = 0;
    916916    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;
    922922    priv->model.cur.cols = 1;
    923923    priv->model.cur.rows = 1;
     
    10231023    INF("o=%p, new size: %dx%d", priv->self, w, h);
    10241024
    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);
    10271027
    10281028    INF("o=%p new grid size cols: %ld, rows: %ld, was %ld, %ld",
     
    11591159    Evas_Coord tw = priv->view.tile.w;
    11601160    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;
    11621162    Evas_Coord oy = y + (last_row - count + 1) * th + off_y;
    11631163    Eina_Inlist **itr_start, **itr_end;
     
    12061206    Evas_Coord tw = priv->view.tile.w;
    12071207    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;
    12091209    Evas_Coord oy = y + off_y + (count - 1) * th;
    12101210    Eina_Inlist **itr_start, **itr_end;
     
    12541254    Evas_Coord tw = priv->view.tile.w;
    12551255    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;
    12571257    Evas_Coord oy = y + priv->view.offset.base.y;
    12581258    Eina_Inlist **itr;
     
    13011301    Evas_Coord tw = priv->view.tile.w;
    13021302    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;
    13041304    Evas_Coord oy = y + priv->view.offset.base.y;
    13051305    Eina_Inlist **itr, **itr_end;
     
    14031403    th = priv->view.tile.h;
    14041404
    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;
    14071409
    14081410    priv->view.offset.old.x = priv->view.offset.cur.x;
     
    14361438    th = priv->view.tile.h;
    14371439
    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;
    14401444
    14411445    priv->view.offset.old.x = priv->view.offset.cur.x;
     
    15701574    _ewk_tiled_backing_store_updates_process(priv);
    15711575
    1572     if (priv->view.offset.base.x >= 0
    1573         || priv->view.offset.base.x <= -2 * priv->view.tile.w
    1574         || priv->view.offset.base.y >= 0
    1575         || 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)
    15761580        ERR("incorrect base offset %+4d,%+4d, tile=%dx%d, cur=%+4d,%+4d\n",
    15771581            priv->view.offset.base.x, priv->view.offset.base.y,
     
    17011705
    17021706    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;
    17051709        return EINA_TRUE;
    17061710    }
     
    17261730        new_y = -model_height + priv->view.h;
    17271731
    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;
    17321736
    17331737    priv->changed.size = EINA_TRUE;
     
    18051809                       model_width, model_height);
    18061810
    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;
    18091813    Evas_Coord new_x = cx + (priv->view.offset.cur.x - cx) * scale;
    18101814    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;
    18151819
    18161820    if (base_row != priv->model.base.row || base_col != priv->model.base.col) {
     
    18701874    if (-new_x > w) {
    18711875        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;
    18741878    }
    18751879
    18761880    if (-new_y > h) {
    18771881        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;
    18801884    }
    18811885
    18821886    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;
    18851889    }
    18861890
    18871891    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;
    18901894    }
    18911895
     
    20072011    priv->view.offset.old.x = 0;
    20082012    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;
    20132017    priv->changed.size = EINA_TRUE;
    20142018
Note: See TracChangeset for help on using the changeset viewer.