If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Lens implementation based on canvas works not smooth enough on N810

RESOLVED WONTFIX

Status

()

Core
Canvas: 2D
RESOLVED WONTFIX
9 years ago
6 years ago

People

(Reporter: romaxa, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

9 years ago
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.
(Reporter)

Comment 1

9 years ago
Created attachment 322906 [details]
canvas playground extension

c++ extension example.

Canvas "lens" rectangle appears on mouseclick event.
Each mousemove event will move canvas rect to new position and redraw canvas window.
(Reporter)

Comment 2

9 years ago
Created attachment 322907 [details]
plain text extension version (for fast reading)
(Reporter)

Comment 3

9 years ago
Created attachment 322911 [details]
plain profile for simple image scaling

Profile data with lens moving on big image page:
http://www.gnu.org/graphics/o_espirito_da_liberdade.fondo.big.png
(Reporter)

Comment 4

9 years ago
Created attachment 322912 [details]
plain profile for lens on text page

Profile data from text page:
'data:text/html,<h1>212klsdfjklasjdklajdlkasjdlashdio22131231231231231231231231233</h1>(repeat)'
(Reporter)

Comment 5

9 years ago
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
...........
(Reporter)

Comment 6

9 years ago
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()));


(Reporter)

Comment 7

9 years ago
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?

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.