Commit Graph

51 Commits

Author SHA1 Message Date
Kartikaya Gupta
11ed3102a7 Bug 711232 - Avoid unnecessary bounce animations. r=pcwalton 2011-12-16 17:01:02 -05:00
James Willcox
f2138c4d9f Bug 670930 - Use asynchronous direct texturing on Android when available 2011-12-16 16:40:58 -05:00
Chris Lord
2962f7d02b Bug 708307 - Decouple texture size from tile size. r=pcwalton
This removes the hard-coded limit of 1024x2048 tile sizes, and allows for
arbitrary tile-sizes. It will still only allocate texture sizes in powers of
two, however. It replaces the tile size with a buffered-area size, which can be
re-allocated as the screen dimensions change.
2011-12-15 23:45:52 +00:00
Ehsan Akhgari
6d31dbe14a Backout changeset 3e972d3efc11 (bug 708307) because it breaks Android tests; a=me 2011-12-14 15:55:17 -05:00
Chris Lord
970a0497a7 Bug 708307 - Decouple texture size from tile size. r=pcwalton a=android-only
This removes the hard-coded limit of 1024x2048 tile sizes, and allows for
arbitrary tile-sizes. It will still only allocate texture sizes in powers of
two, however. It replaces the tile size with a buffered-area size, which can be
re-allocated as the screen dimensions change.
2011-12-14 19:41:37 +00:00
Patrick Walton
2adc6acc0a Bug 710096 - Hold the monitor on the layer controller when adjusting and rendering the viewport metrics. r=Cwiiis a=java-only 2011-12-13 14:43:08 -08:00
Brad Lassey
5e981f3a4e bug 708961 - We still use ByteBuffer.allocateDirect for large buffers r=pcwalton a=java-only 2011-12-13 17:53:51 -05:00
Kartikaya Gupta
f3d2bc109b Bug 707675 - Change OOM log level from error to warning. r=blassey a=java-only 2011-12-13 16:42:51 -05:00
Chris Lord
9fb06bc547 Bug 708683 - Guard more rigorously against bad viewport updates. r=kats a=android-only
Check more values in browser.js when updating the viewport, and restructure
the JSON conversion in Java so that it's easier to tell what value caused a
bad viewport if it comes from Java.
2011-12-13 14:12:07 -05:00
Kartikaya Gupta
46f2f122ed Bug 704738 - Resize page content on device rotation. r=Cwiiis a=java-only
Some cleanup: ensure we abort and re-bounce the viewport
if the device is rotated during a double-tap zoom. Also
rename variables to be more appropriate
2011-12-12 11:22:34 -05:00
Kartikaya Gupta
68bdd4c576 Bug 708683 - Improve JSON generation by using JSONStringer. r=pcwalton a=java-only 2011-12-09 22:58:10 -05:00
Kartikaya Gupta
82f722dafb Bug 704784 - Fade scrollbars when content stops moving [r=pcwalton] 2011-12-09 16:05:24 -05:00
Kartikaya Gupta
1da899baa6 Bug 704784 - Tweak scrollbars to look nicer [r=pcwalton]
Scrollbars now have rounded endcaps, are a little smaller, and there
is a 1-pixel gap between the bar and the edge of the viewport. Just
generally making them look nicer.
2011-12-09 15:58:36 -05:00
Patrick Walton
043e3dd5e4 Bug 708921 - Bounce back during overscroll when the magnitude of the velocity vector exceeds the stopped threshold. r=kats 2011-12-09 12:06:06 -08:00
Patrick Walton
9a8e9bb15f Bug 708519 - Pref off the frame rate meter r=kats 2011-12-09 10:01:31 -05:00
Patrick Walton
1e3d22a377 Bug 708519 - Move the frame rate meter to bottom-right r=kats 2011-12-09 10:01:28 -05:00
Patrick Walton
daa98e075b Bug 708519 - Repair the frame rate meter r=kats 2011-12-09 10:01:26 -05:00
Kartikaya Gupta
442fc65cca Bug 707675 - Catch and handle a possible OOM while getting a screenshot r=blassey 2011-12-07 17:10:21 -08:00
Patrick Walton
bd59295e9c Bug 701594 - Part 4: Make LayerController.setViewportMetrics() not automatically assume it was called by the layer client. r=kats 2011-12-07 10:48:12 -08:00
Patrick Walton
c22e958de7 Bug 701594 - Part 3: Add viewport interpolation functions. r=kats 2011-12-07 10:44:36 -08:00
Patrick Walton
8bec5742fe Bug 701594 - Part 1: Precompute the ease-out animation. r=kats 2011-12-07 10:41:58 -08:00
Kartikaya Gupta
d7fe093722 Bug 706251 - Add panning performance API r=blassey
Add a PanningPerfAPI class with static methods to record panning
performance.
2011-12-01 14:11:10 -05:00
Kartikaya Gupta
5d06f92224 Bug 707483 - Make javascript scrollTo work properly [r=pcwalton]
If a scroll event comes in that changes the scroll coordinates
from those that were last set by user scrolling in Java, then
update the Java viewport with the new coordinates. Note that
this may occur in the middle of a draw, when Gecko already has
the transaction lock acquired on the tile buffer. Therefore we
need to delay the update until after the draw is complete.
2011-12-06 13:50:21 -05:00
Kartikaya Gupta
e519a8f623 Bug 704738 - Snap to edges on device rotation [r=Cwiiis] 2011-12-05 13:23:32 -05:00
Wes Johnston
fd749418cf Bug 697701 - Double tap zoom support. r=cwiiis 2011-11-15 13:41:19 -08:00
Kartikaya Gupta
cb40afef41 Bug 696319 - Scroll window as needed when soft keyboard is up [r=mfinkle]
Send an event to scroll to the focused input field when the
soft keyboard comes up. Ensure that this happens *after* the
viewport change event is sent to Gecko, so that Gecko actually
knows that browser viewport is smaller and doesn't just no-op
the scroll request.
2011-12-03 22:59:27 -05:00
Kartikaya Gupta
a2dac44a5d Bug 707285 - Disallow browser.js from overriding viewport size [r=pcwalton]
Don't allow Gecko to set the viewport size because Java knows
this better. Allowing this behaviour could result in Bad Things(TM)
under certain race conditions such as described in bug 707285.
2011-12-03 10:56:39 -05:00
Patrick Walton
747a4d7e3c Bug 705170 - Use OES_draw_texture to render textures to the screen. r=Cwiiis 2011-12-01 14:05:41 -08:00
Kartikaya Gupta
c844bf872f Bug 704690 - Abort flings on gecko viewport update [r=Cwiiis]
If the Java code is in the middle of a fling when Gecko sends
a viewport update, abort the fling, cancel the velocity, and
re-fling. The re-fling is purely to get the page snapped to an
edge if needed.
2011-12-01 09:37:37 -05:00
Brad Lassey
29bd27c504 bug 706383 - Save screenshot in bundle, adjust indentation r=dougt 2011-11-30 21:31:41 -05:00
Brad Lassey
690edac9e0 bug 706383 - Save screenshot in bundle r=dougt 2011-11-30 21:28:05 -05:00
Brad Lassey
e37fccddf5 bug 704022 - PlaceholderLayerClient OOM at ByteBuffer.allocateDirect r=dougt 2011-11-30 21:28:04 -05:00
Kartikaya Gupta
da116c45a0 Bug 706207 - Fix incorrect pageWidth in viewport update [r=dougt]
Missing pieces of the document resulted in pageWidth getting
assigned to NaN, which was serialized as null by JSON. This
resulted in an exception over in Java-land when deserialization
was attempted, and killed the viewport update entirely.
2011-11-30 14:22:40 -05:00
Chris Lord
307be0441c Bug 705171 - Render when necessary, instead of continuously. r=kats,pcwalton
Set the render mode to RENDERMODE_WHEN_DIRTY and request a redraw when a layer
transaction ends and when the viewport in LayerController changes. This stops
us from drawing continuously.
2011-11-30 17:27:13 +00:00
Brad Lassey
8162819b01 bug 704307 - strictmode Disk read Violation when loading awesomebar r=dougt 2011-11-29 22:54:07 -05:00
Brad Lassey
8fa901c3ce bug 706325 - add thumbnails to tab objects r=dougt 2011-11-29 22:54:07 -05:00
Kartikaya Gupta
37965779eb Bug 704950 - Add a message to update the Java viewport [r=Cwiiis]
Add a Viewport:Update message that can be sent from browser.js
to the Java side to force an update to the viewport information.
2011-11-29 09:58:35 -05:00
Kartikaya Gupta
81e4d56a16 Bug 704950 - Remove java guess to reset viewport [r=Cwiiis]
This removes the "mNewContent" java-side guess as to when
gecko has loaded new content.
2011-11-29 09:58:22 -05:00
Chris Lord
ff98b1c36d Bug 703141 - Remove bogus viewport reply tracking. r=kats
If we sent a viewport to Gecko that causes no change in what's drawn on the
screen, we wouldn't receive a reply and this would cause us to deadlock until
a redraw happens for some other reason.

As viewport changes are throttled at max 1 per 350ms, just remove this check.
After IRC discussion, it was deemed unnecessary.
2011-11-23 20:04:05 +00:00
Chris Lord
133e2a7438 Bug 703141 - Restore usage of the redraw hint. r=kats
Earlier patches mistakenly removed the redraw hint. This restores it, and
alters its behaviour to work correctly with regards to the viewport. This
should help mitigate some checker-boarding and performance issues when panning
and zooming.
2011-11-23 19:08:20 +00:00
Chris Lord
3bc8eb0f77 Bug 703141 - Fix plugin positioning and sizing. r=kats, pcwalton
This fixes plugin position/size in the new displayport-viewport scheme.
2011-11-23 19:08:11 +00:00
Chris Lord
2215a89fc3 Bug 703141 - Try to draw aligned to the pixel grid. r=pcwalton
To stop bad-looking text/fuzzy images, try to draw aligned to the pixel grid.
2011-11-23 19:07:51 +00:00
Chris Lord
43d46bf721 Bug 703141 - Reinstate zooming and add CSS zooming after viewport change. r=kats
This patch reinstates pinch-zooming and adds CSS re-scaling so that after
zooming, the page is rendered at the scaled resolution and you get clear text.

--HG--
rename : mobile/android/base/gfx/IntSize.java => mobile/android/base/gfx/FloatSize.java
2011-11-23 19:07:47 +00:00
Chris Lord
8947fea4fd Bug 703141 - Refactor around the idea of a viewport and displayport. r=kats
This patch refactors the code to make some of the value names and ownership
clearer, and to add the idea of a 'viewport' within a 'displayport'. The
displayport is the area of the page which is visible to the underlying buffer
and the viewport is the area of the page which is visible through the
application window.

--HG--
rename : mobile/android/base/ui/ViewportController.java => mobile/android/base/gfx/ViewportMetrics.java
2011-11-23 19:07:29 +00:00
Kartikaya Gupta
1fa479b70e Bug 701351 - Add scroll indicators [r=pcwalton]
Add blocky scroll indicators to the java compositor.
2011-11-21 18:15:29 -05:00
Doug Turner
e0f64fc777 no bug - disable screenshot until Google bug 16941 is worked around. r=mfinkle 2011-11-21 10:16:52 -08:00
Kartikaya Gupta
2b9d742642 Bug 704114 - Fix missing texture crash [r=pcwalton]
During startup there is a race condition where the
LayerRenderer might request a paint of the root layer before
the root layer has successfully generated a texture.
This might happen if the transaction lock is already held
when the root layer attempts to generate the texture. Fix
by inserting a null guard that aborts the paint if the texture
has not been generated.
2011-11-21 12:17:24 -05:00
Kartikaya Gupta
9b6580e59c Bug 703256 - Fix incorrect thread access [r=pcwalton]
Make sure things that touch the zoom/pan state and view
hierarchy are executing on the main UI thread.
2011-11-21 10:06:20 -05:00
Brad Lassey
e0a53fb4cf bug 701703 - Null pointer exception thrown loading Fennec Start Page r=dougt 2011-11-19 19:46:31 -05:00
Patrick Walton
88891e12c6 Bug 703421 - Implement the Android draw metadata listener to fix races. r=kats 2011-11-18 18:07:14 -08:00