[Webkit-unassigned] [Bug 64728] TiledDrawingArea: Use tile sets to paint old content while rendering for a new scale.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 20 13:21:18 PDT 2011


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





--- Comment #6 from Jocelyn Turcotte <jocelyn.turcotte at nokia.com>  2011-07-20 13:21:18 PST ---
(In reply to comment #5)
> > Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp:60
> > +{
> > +}
> 
> It'd be nice to have ASSERT(m_proxy) here so that fails early.
> 
Good idea.

> > Source/WebKit2/UIProcess/TiledDrawingAreaProxy.h:78
> > +    TileMap& tiles() { return m_tiles; }
> 
> This is breaking the abstraction of TiledDrawingAreaTileSet.
> 
> It looks to me like TiledDrawingAreaProxy::updateTileBuffers() does not use any attribute so it could be a method of TiledDrawingAreaTileSet.
> The case of TiledDrawingAreaProxy::tileBufferUpdateComplete() is a bit more tricky. If you manage to refactor it to avoid knowing about the tiles, the TiledDrawingAreaTileSet would be the only owner of m_tiles making a nicer abstraction.
> 
> > Source/WebKit2/UIProcess/TiledDrawingAreaProxy.h:82
> > +    void setTile(const TiledDrawingAreaTile::Coordinate&, PassRefPtr<TiledDrawingAreaTile>);
> 
> Should this be private? It looks for me like the TiledDrawingAreaTileSet has the responsibility to manage its TiledDrawingAreaTile.

Humm, at first I wanted to split responsibilities but I soon realized that there is no apparent reason to do so, handling tiles, their updates and painting them are not things easy to split apart and will introduce complexity with few benefits if done so.
The tile set was then just supposed to be a tile container with an attached scale ratio and a bare minimum of methods in it.

Though since this seems to annoy you as well, having this result in the end might give the impression of an incomplete lazy half-opened class. It might be better to just have the tile set as a struct { tiles; scale; }; and move those functions back to the TDAProxy with a tile set struct reference parameter. What do you think? Or tell me if you have other ideas.
Because anyway the only need I have is to group those tiles together.

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



More information about the webkit-unassigned mailing list