Closed Bug 436254 Opened 16 years ago Closed 13 years ago

Lens implementation based on canvas works not smooth enough on N810

Categories

(Core :: Graphics: Canvas2D, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: romaxa, Unassigned)

Details

Attachments

(4 files)

I have some implementation of "movable lens" based on <canvas> for N810.

But it works not very fast and smooth,
and performance is very different for different content on the page.

I think it should be possible to optimize canvas/RenderDocument for smooth redrawing of scaled parts of page on each mousemove event.
c++ extension example.

Canvas "lens" rectangle appears on mouseclick event.
Each mousemove event will move canvas rect to new position and redraw canvas window.
Profile data with lens moving on big image page:
http://www.gnu.org/graphics/o_espirito_da_liberdade.fondo.big.png
Profile data from text page:
'data:text/html,<h1>212klsdfjklasjdklajdlkasjdlashdio22131231231231231231231231233</h1>(repeat)'
Also while it moving there are ASSERTION in debug build:
........
###!!! ASSERTION: cannot call GetUsedBorder on a dirty frame not currently being reflowed: 'nsLayoutUtils::sDisableGetUsedXAssertions || !NS_SUBTREE_DIRTY(this) || (GetStateBits() & NS_FRAME_IN_REFLOW)', file mozilla/layout/generic/nsFrame.cpp, line 560
...........
Also attached sources is buggy:

This need to be changed:
-NSIntPixelsToAppUnits(mX+aWidth, nsIDeviceContext::AppUnitsPerCSSPixel()),
-NSIntPixelsToAppUnits(mY+aHeight, nsIDeviceContext::AppUnitsPerCSSPixel()));
+NSIntPixelsToAppUnits(aWidth/2,nsIDeviceContext::AppUnitsPerCSSPixel()),
+NSIntPixelsToAppUnits(aHeight/2, nsIDeviceContext::AppUnitsPerCSSPixel()));


Oh, still one problem

-gfxASurface *surface = nsnull;
-cx->GetThebesSurface(&surface);
-nsRefPtr<gfxContext> ctx = new gfxContext(surface);
+nsRefPtr<gfxASurface> surface;
+cx->GetThebesSurface(getter_AddRefs(surface));

This bug hasn't been touched in 3 years. Can we close it romaxa?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: