Commit Graph

62 Commits

Author SHA1 Message Date
Chris Lord
3e51ec6c57 Bug 720613 - Prevent resizing before the surface has been created. r=pcwalton
Prevent trying to resize the buffer before the surface has been created. At
that point, we wouldn't know our maximum texture size, so we would've thrown a
RuntimeException.
2012-01-31 09:36:00 +00:00
Kartikaya Gupta
86ae8599a9 Bug 720144 - Expose methods in robocop to grab the painted surface and to compare pixels. r=jmaher 2012-01-30 22:46:13 -05:00
Kartikaya Gupta
c2137e83db Bug 720144 - Allow listening for draw updates and obtaining a copy of the composited surface for robocop testing. r=Cwiiis 2012-01-30 22:45:38 -05:00
Chris Lord
06edecb7c5 Bug 721070 - Checkerboarding at bottom after pinch zooming out. r=kats,pcwalton
Certain conditions would cause MultiTileLayer to incorrectly invalidate tiles,
or to reuse tiles incorrectly, which would cause checkerboarding (sometimes
permanent until a redraw occurs).

This addresses said issues:

- Removes manual invalidation on Document:Shown and Tab:Selected. This is
  unnecessary, as the entire buffer will be invalidated when this happens
  anyway. Sometimes Document:Shown happens *after* drawing has occurred,
  which caused the entire screen to checkerboard incorrectly.
- Fix re-using off-screen tiles with the incorrect resolution. Tiles are stored
  in a hash-map based on their unscaled position. As only tiles that intersect
  with the update region in tile-space are invalidated, sometimes tiles that
  were off-screen, but whose unscaled tile origin appears on-screen would be
  incorrectly re-used. Fix this by checking that a tile's resolution matches the
  current resolution before reusing it.
2012-01-26 20:19:35 +00:00
Chris Lord
8825134fee Bug 721100 - After panning, tap area is offset at wrong place. r=pcwalton
When rendering with an offset for MultiTileLayer, the tile origin was moved
to compensate, but this lead to there being a mismatch between Gecko's
displayport origin and the one recorded on the Java side.

Instead of altering the origin, allow setting a render offset on MultiTileLayer
instead, so the origin remains correct.
2012-01-26 20:18:47 +00:00
Brad Lassey
59fa32e27e bug 711201 - instrument when we paint for performance testing r=dougt 2012-01-24 15:53:49 -05:00
Margaret Leibovic
fa3a7708d0 Bug 721220 - Send message back to java after tab selection is complete. r=mbrubeck 2012-01-25 20:06:08 -08:00
Patrick Walton
a91400a930 Bug 710533 - Tint the checkerboard with the background color of the page. r=Cwiiis 2012-01-23 20:10:24 -08:00
Chris Lord
9a81bc09ee Bug 717283 - Use tiles on-demand. r=pcwalton, snorp
Instead of tying the tile-buffer in MultiTileLayer directly to the back-buffer
of the page, make sure rendering is always aligned to the tile grid and use
tiles on-demand. This makes better use of tiles when panning/zooming, and opens
up the route for further optimisations.
2012-01-24 15:39:53 +00:00
Phil Ringnalda
f9599dfc5a Backed out changeset b77c0c621163 (bug 710533) for native ts bustage 2012-01-23 23:33:05 -08:00
Phil Ringnalda
96279919ee Back out 420d7b8ed59d for being a bad backout 2012-01-23 23:32:11 -08:00
Phil Ringnalda
36ccde4b4b Backed out changeset b77c0c621163 (bug 710533) for native ts bustage 2012-01-23 22:53:07 -08:00
Patrick Walton
06b9c3c2f9 Bug 710533 - Tint the checkerboard with the background color of the page. r=Cwiiis 2012-01-23 20:10:24 -08:00
Ed Morley
c1585c7af3 Backout 91eebc6bdb59 & 7d776b291014 (bug 717283) for Android native reftest crashes 2012-01-22 11:55:18 +00:00
Chris Lord
d994084581 Bug 717283 - Use tiles on-demand. r=pcwalton, snorp
Instead of tying the tile-buffer in MultiTileLayer directly to the back-buffer
of the page, make sure rendering is always aligned to the tile grid and use
tiles on-demand. This makes better use of tiles when panning/zooming, and opens
up the route for further optimisations.
2012-01-22 09:40:37 +00:00
Matt Brubeck
3017d8c4c6 Back out 47584f117727 and e05a8743389a (bug 717283) because of native Android startup crashes 2012-01-20 11:42:34 -08:00
Chris Lord
94b277a126 Bug 717283 - Use tiles on-demand. r=pcwalton, snorp
Instead of tying the tile-buffer in MultiTileLayer directly to the back-buffer
of the page, make sure rendering is always aligned to the tile grid and use
tiles on-demand. This makes better use of tiles when panning/zooming, and opens
up the route for further optimisations.
2012-01-20 17:36:56 +00:00
James Willcox
43d0cd88c2 Bug 719233 - Only use direct texturing on whitelisted devices r=blassey 2012-01-18 20:41:28 -05:00
Brad Lassey
fb5cf486c0 bug 713874 - Black thumbnails are produced by GeckoSoftwareLayerClient.getBitmap() r=mfinkle 2012-01-13 13:10:13 -05:00
Jonathan Kew
1fed2b4bed Backed out changeset ba3335f34100 (bug 713874) for Android build failures. 2012-01-14 22:19:31 +00:00
Brad Lassey
232084ed7f bug 713874 - Black thumbnails are produced by GeckoSoftwareLayerClient.getBitmap() r=mfinkle
--HG--
extra : rebase_source : 18d463ca4c44610a07ba7de582c6f114404eab8f
2012-01-13 13:10:13 -05:00
Chris Lord
f0a2ffe64f Bug 709120 - Use MultiTileLayer in Android native fennec. r=pcwalton
This uses MultiTileLayer instead of SingleTileLayer for devices that don't have
gralloc support. This has the advantage of reduced memory usage due to less
wastage from power-of-two textures, and can be a performance boost due to slow
sub-image updates on some devices.
2012-01-06 11:22:38 +00:00
Patrick Walton
4d03f73178 Bug 709492 - Part 4: Send a viewport size upon loading Gecko so that we don't suppress painting for the first page. r=kats 2012-01-03 22:55:10 -08:00
Patrick Walton
463cb8081a Bug 709492 - Part 3: Tie viewport updates to drawing to avoid page transition flicker. r=kats 2012-01-03 22:55:04 -08:00
Patrick Walton
dfec4981df Backed out bug 709492 due to breakage with external urls. r=backout 2011-12-30 18:47:06 -05:00
Patrick Walton
12f36a2eac Bug 711333 - Fix race condition when moving and updating textures. r=kats 2011-12-30 14:08:58 -08:00
Patrick Walton
84ee2f57dd Bug 709492 - Part 4: Hide the page when navigating, and expose it when the new page appears. r=kats 2011-12-29 15:10:30 -08:00
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
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
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
Kartikaya Gupta
2082d75da1 Bug 712037 - Add lots of logging to help diagnose viewport issues. r=Cwiiis 2011-12-19 22:32:41 -05: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
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
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
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
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
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