Commit Graph

69 Commits

Author SHA1 Message Date
Chris Lord
2853435e26 Bug 711426 - Fix some causes of crashes when rotating. r=kats
The lock on the software buffer was not being respected when destroying the
surface on screen rotation, meaning we could destroy it while Gecko was still
drawing to it. This would certainly cause a crash on rotation under the right
conditions. The same situation also occurred in
GeckoSoftwareLayerClient.getBitmap().

We also waited until the next redraw when freeing the old texture associated
with the surface. This had the effect of temporarily increasing the memory
usage (generally by either 4.5 or 9 megabytes). If memory pressure is high,
this could also cause a crash, though it is far less likely than the above case.
2011-12-24 00:49:00 +00:00
Chris Lord
791faec477 Bug 709152 - Adjust viewport offset while panning. r=pcwalton
This patch adjusts the viewport offset while panning to increase the
buffered area in the direction of panning, and thereby reduce checkerboarding.
2011-12-22 11:35:41 +00:00
Chris Lord
4122e6b473 Bug 709152 - Squash multiple viewport events in nsAppShell. r=pcwalton
We only ever want to respond to the latest viewport sent, separate the
viewport change into its own event and remove all but the latest in the queue
when processing events.
2011-12-22 11:35:32 +00:00
Chris Lord
ac3fc389c8 Bug 709152 - Group multiple texture uploads into a single upload. r=pcwalton
Instead of tracking multiple rectangles when we receive endDrawing calls,
just union the dirty area into a single rectangle.
2011-12-22 11:35:17 +00:00
Brad Lassey
9996032099 bug 712787 - remove showScreenshot (dead code) r=dougt 2011-12-21 18:01:57 -05:00
James Willcox
cc2798c792 Bug 670930 - Use asynchronous direct texturing on Android when available 2011-12-21 14:05:23 -05:00
Brad Lassey
e777c345b9 bug 711757 - Fatal Exception: GeckoLooper Thread @ java.lang.IllegalArgumentException: width and height must be > 0 r=dougt 2011-12-20 00:29:04 -05:00
Kartikaya Gupta
b74f03c21e Bug 709817 - Ensure PZC is always accessed on the UI thread. r=pcwalton
Ensure that all public functions in PZC are always called from
the UI thread, so that internal variables are not mutated on
different threads. I also made animatedZoomTo private so that
it can't be inadvertently called from a non-UI thread outside
the class.
2011-12-20 16:53:39 -05:00
Kartikaya Gupta
6a504879ae Bug 709817 - (Cleanup) Replace geometryChanged() with abortAnimation() and remove dead calls. r=pcwalton
Since the geometryChanged function does nothing if the parameter passed
in is false, better to rename the function to be more indicative of
what it actually does, and remove all the resulting dead code.
2011-12-20 16:53:39 -05:00
Wes Johnston
a4411ce61c Bug 711905 - Support adding links to homescreen from awesomebar [r=mfinkle] 2011-12-20 10:28:12 -05:00
Kartikaya Gupta
2082d75da1 Bug 712037 - Add lots of logging to help diagnose viewport issues. r=Cwiiis 2011-12-19 22:32:41 -05:00
Kartikaya Gupta
fbaeedc588 Bug 712037 - Add a toString() method on the viewport. r=Cwiiis 2011-12-19 22:28:48 -05:00
Kartikaya Gupta
4a72a73a37 Bug 709560 - Set blend function when enabling gl blending. r=pcwalton
The missing blend function was causing the default of GL_ONE,
GL_ZERO to take effect, making it look like alpha blending wasn't
working. It would start working once the 9-patch shadow was rendered
since that code sets the correct blend function. Fix this by
ensuring we set the blend function wherever we use blending.
2011-12-19 17:40:01 -05:00
Kartikaya Gupta
4947890040 Bug 711232 - Avoid unnecessary bounce animations. r=pcwalton 2011-12-16 17:01:02 -05:00
Doug Turner
42115e5a4e Backout of 9d027bf631d3 2011-12-17 21:52:54 -08:00
Doug Turner
7543f9ad60 Backout of 8a5cc33141a3 2011-12-17 21:33:44 -08:00
Doug Turner
5ecd025014 Backout of f39dab2d2adb 2011-12-17 21:32:48 -08:00
Doug Turner
9d3905ac3a Backout of 74277c18e7ce 2011-12-17 21:32:24 -08:00
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