Commit Graph

417 Commits

Author SHA1 Message Date
Kartikaya Gupta
b8a49761d8 Bug 749384 - Hardcode the touch event timeout to 200ms. r=wesj 2012-05-15 13:21:14 -04:00
James Willcox
d5dd933479 Small fixup to my last patch (no bug, r=blassey) 2012-05-11 11:05:37 -04:00
James Willcox
cf8bd24b8d Bug 750778 - Ensure PluginLayer is always present when plugin is visible r=blassey 2012-05-11 10:54:51 -04:00
Margaret Leibovic
7f2339b775 Bug 752759 - Get rid of excessive mFormAssistPopup.hide() calls in PanZoomController. r=kats 2012-05-10 12:09:00 -07:00
Kartikaya Gupta
8b2a37c104 Bug 753334 - Audit and clean up code that deals with allocating/freeing direct buffers. r=Cwiiis 2012-05-10 09:46:53 -04:00
Phil Ringnalda
528e055ee2 Back out 3502d9840d98 (bug 752368) for robo* failure 2012-05-09 22:26:52 -07:00
Vladimir Vukicevic
7eaf529b88 b=752368; [android] random black screen when opening links from other apps; r=bgirard,ajuma 2012-05-09 22:32:54 -04:00
Joe Drew
32d3e5df67 Bug 728026 - Leave the scissor bit enabled when we return from Java code. r=jrmuizel 2012-05-01 12:12:45 -04:00
Kartikaya Gupta
c4b85971ec Bug 752939 - Update the mGeckoViewport when switching tabs so that we map touch events to the right point. r=Cwiiis 2012-05-08 13:33:48 -04:00
James Willcox
7b6aaa5bb8 Bug 746633 - Don't use placeholder for full page plugins on Android r=blassey 2012-05-07 14:18:46 -04:00
Kartikaya Gupta
eff1661013 Bug 749429 - Increase displayport size multiplier default to 2000 for fixed-margin and velocity-bias. r=Cwiiis 2012-04-28 01:02:19 -04:00
Jeff Muizelaar
006b21ee67 Bug 743247. Ensure we don't have an array buffer bound when drawing PluginLayer. r=kats
This fixes the same problem in the newly added PluginLayer
2012-04-28 00:55:16 -04:00
Jeff Muizelaar
6868688876 Bug 743247. Ensure we don't have an array buffer bound when drawing. r=bas
Our C++ code was binding a buffer and leaving it bound. This
avoids that problem by making sure we unbind it before
calling VertexPointerAttrib.

--HG--
extra : rebase_source : ec39fcf4a6a74c2f96765752b0ffb6e38b44f5de
2012-04-27 21:08:30 -04:00
James Willcox
4b0d6b0c67 Bug 727116 - Draw Flash plugins with OpenGL during pan/zoom on legacy Android r=blassey 2012-04-27 16:04:47 -04:00
Chris Lord
077e78ae9e Bug 749630 - Fix single-colour checkerboard and masking. r=kats
Bug 748718 tried to fix masking of the checkerboard layer, but incorrectly
calculated the values for the right and bottom sides of the page, causing
less masking to occur than should happen.

It also possibly broke single-colour layer drawing (though I'm not sure this
worked previously), which this fixes by clearing to the page colour instead of
generating and drawing a texture for it.
2012-04-27 12:54:18 -04:00
Kartikaya Gupta
c5f74999ce Bug 749164 - Fix viewport intersection with page rect and guard against zero screen area. r=jrmuizel 2012-04-26 14:23:28 -04:00
Chris Lord
6e7a025ac6 Bug 748718 - Make ScreenshotLayer use SingleTileLayer's draw function. r=kats
ScreenshotLayer overrides SingleTileLayer's draw function to simplify the
drawing process. Unfortunately, this doesn't respect the layer mask, and can
cause the layer to appear incorrectly stretched.

Change the screenshot process so that whole-page screenshots pass parameters
that are pre-scaled (to avoid mismatches when the viewport changes), and set
the page size on the ScreenShotLayer so it draws in the correct place.

This also alters the masking slightly to avoid visible seams around masks in
the centre of the page, and to avoid unnnecessary drawing at the edges of the
page.

This change fixes the frame-rate issues with the screenshot layer, as it
removes unnecessary over-draw.

--HG--
extra : rebase_source : 671c5a48d7bc08b3b452ed7eea228eb22843c1ce
2012-04-26 13:45:31 -04:00
Chris Lord
27218c111a Bug 748718 - Crash if the buffer size mismatches the layer size. r=kats
TileLayer.java always treats the buffer as if it's the same size as the texture.
Instead of crashing (or some other unintended effect), throw a RunTimeException.
Also include some commented out code that would work, but we likely don't ever
want to use (for reference when running into the exception).

--HG--
extra : rebase_source : 93b4c834c2a0dc0fab62341f779de9c7fcce5f87
2012-04-26 13:45:17 -04:00
Chris Lord
26258e2a6c Bug 748718 - Fix drawing in SingleTileLayer.java. r=kats
SingleTileLayer draws upside-down and doesn't handle non-repeating/stretched
layers correctly.

--HG--
extra : rebase_source : d33dcecc949b252826f557033e47311f885bd9b8
2012-04-26 13:45:06 -04:00
Kartikaya Gupta
9ee6956b0f Bug 747528 - Add a PredictionBiasStrategy that uses estimated draw time to paint ahead. r=Cwiiis 2012-04-25 09:53:38 -04:00
Jeff Muizelaar
d8ab26c2d8 Bug 748382. Don't count overscroll as checkerboard. r=kats
We currently check root layer position with the viewport.
During overscroll these won't match and we'll think we're
checkerboarding.

--HG--
extra : rebase_source : 27c93b524a539ad5851ff4ba5ee94f5321c24172
2012-04-24 11:26:21 -04:00
Brad Lassey
7209478fe4 bug 746016 - Cache low res version of the page in the java ui for use instead of checkerboarding r=kats
--HG--
extra : rebase_source : d6de0327a46393cd4cfc327dea5689364744a71d
2012-04-24 15:13:36 -04:00
Kartikaya Gupta
27d73b129b Bug 737510 - Expand the displayport to fill any partial tiles. r=Cwiiis 2012-04-23 23:53:44 -04:00
Kartikaya Gupta
c49b3b664f Bug 737510 - Print something useful when dumping an ImmutableViewportMetrics. r=Cwiiis 2012-04-23 23:52:58 -04:00
Joe Drew
0d5dda8fca Bug 744439 - Reset the checkerboard colour when we start loading a new page. r=kats a=blocker
--HG--
extra : rebase_source : ca294fc3dd36a0d0a299c8247aa72673e115d372
2012-04-23 10:29:14 -07:00
Joe Drew
5268da0002 Bug 745809 - Default to white for checkboard color. r=kats
--HG--
extra : rebase_source : a1b7f38fc97f0f0048df000aebc510cbff1b1801
2012-04-23 10:28:15 -07:00
Joe Drew
6885673109 Bug 744939 - Make animatedZoomTo operate in CSS pixels instead of device pixels. r=kats a=blocking-fennec 2012-04-14 13:18:10 -04:00
Joe Drew
5248a80c1d Bug 744916 - Make the Java viewport keep track of its size in both CSS pixels and device pixels. r=kats
--HG--
extra : rebase_source : f733c2a4eadaeaa9c845b83886af8ab335250f85
2012-04-12 16:00:56 -04:00
Ali Juma
45b0527065 Bug 733596 - Tell the compositor about the new surface size on surface change. r=bgirard a=blocking-fennec 2012-04-20 11:46:30 -04:00
Wes Johnston
6f7576993b Bug 746679 - Reset touch event dispatch state on each touch down. r=kats, a=blocking-fennec 2012-04-20 08:40:41 -07:00
Kartikaya Gupta
f4b524921e Bug 743800 - Ensure all metrics used during one frame of composition are consistent. r=jrmuizel a=blocking-fennec 2012-04-18 01:34:05 -04:00
Wes Johnston
99c82ed91c Backed out changeset a43a33ddd2b3 2012-04-17 09:29:18 -07:00
Kartikaya Gupta
019157b1fe Bug 745381 - Don't call GetFrameFromPoint for non touchstart touch events. r=smaug 2012-04-17 09:28:10 -07:00
Kartikaya Gupta
6756e736ea Bug 741693 - Move the Axis prefs from GeckoLayerClient into PanZoomController. r=Cwiiis 2012-04-17 11:33:42 -04:00
Kartikaya Gupta
606c739bdf Bug 741693 - Make the zoom animation frames preffable. r=Cwiiis 2012-04-17 11:33:19 -04:00
Jeff Muizelaar
3c7124b7f8 Bug 742743. Unify pageRect retrieval. r=kats
This ensures that we use the same pageRect for the whole
drawing process and avoids the overhead of recreating it.
2012-04-05 15:58:42 -04:00
Jeff Muizelaar
06f77c2dbc Bug 742743. Remove needless try/catch block. r=kats
This was needed before, but I've since removed
the code that would throw.
2012-04-05 11:42:49 -04:00
Jeff Muizelaar
307aeaae2d Bug 742731. Remove performUpdates return value. r=kats
No need to have a return value if it's always going to be true.

--HG--
extra : rebase_source : 78b0ad28f320c84080bea6bd62cafe2cb33bdd5b
2012-04-05 11:32:16 -04:00
Kartikaya Gupta
8689475480 Bug 744390 - Add a configurable danger zone to the velocity-bias strategy. r=Cwiiis 2012-04-14 09:50:04 -04:00
Kartikaya Gupta
2bb28155e7 Bug 742115 - Make the java panning constants preffable; original patch stolen from :joe. r=Cwiiis 2012-04-13 10:29:14 -04:00
Kartikaya Gupta
e013f9aa91 Bug 744241 - Make the displayport strategy options preffable. r=Cwiiis 2012-04-13 10:28:10 -04:00
Kartikaya Gupta
4df62cf792 Bug 733041 - Switch to using the velocity-bias strategy by default. r=Cwiiis 2012-04-10 13:56:28 -05:00
Kartikaya Gupta
617cfd1a55 Bug 733041 - Adjust the velocity bias strategy to keep a small buffer in the opposite direction of the scroll. r=Cwiiis 2012-04-10 13:56:25 -05:00
Jeff Muizelaar
a713c834a5 Bug 740303. Make sure we update the checkerboard layer. r=kats.
Presumably this started happening after we stopped setting the
checkerboard color all of the time.

--HG--
extra : rebase_source : d9c76561256161335727d3e76c8a8aed37a36c97
2012-04-09 10:59:36 -04:00
Kartikaya Gupta
dec4c11b3e Bug 742019 - Rewrite how we handle touch events so we don't break panning, and don't introduce unnecessary latency. r=wesj 2012-04-07 03:09:26 -04:00
Jeff Muizelaar
92907fc375 Bug 740898. Merge LayerView and GLSurfaceView. r=pcwalton
Once, GLThread is gone we don't have any need to support both styles of GL
rendering. Merging LayerView and FlexibleGLSurfaceView makes it clearer what's
going on, and I expect we'll also be able to take out some dead code from the
resulting LayerView.

This patch is mostly uninteresting. The interesting bits are that
implementations of requestRender and the constructors are merged. Everything
else is mostly copying over methods and renaming FlexibleGLSurfaceView's
mController to mGLController.
2012-04-05 11:28:50 -04:00
Jeff Muizelaar
7d1674c7e7 Backed out changeset 0f8439284834
The bug number was wrong.
2012-04-05 11:27:02 -04:00
Jeff Muizelaar
8e910730b7 Bug 730898. Merge LayerView and GLSurfaceView. r=pcwalton
Once, GLThread is gone we don't have any need to support both styles of GL
rendering. Merging LayerView and FlexibleGLSurfaceView makes it clearer what's
going on, and I expect we'll also be able to take out some dead code from the
resulting LayerView.

This patch is mostly uninteresting. The interesting bits are that
implementations of requestRender and the constructors are merged. Everything
else is mostly copying over methods and renaming FlexibleGLSurfaceView's
mController to mGLController.
2012-03-30 14:21:59 -04:00
Kartikaya Gupta
879f2209f2 Bug 741400 - Guard against NullPointerException, and also move some code so it shouldn't happen. r=mfinkle 2012-04-04 11:55:40 -04:00
Kartikaya Gupta
4074333e81 Bug 737577 - Set the display port before bouncing rather than after. r=Cwiiis 2012-04-02 17:14:33 -04:00
Joe Drew
83fd342954 Bug 741166 - Add clarifying comment. DONTBUILD
--HG--
extra : rebase_source : 4d2e524732e6a02d99f3c2b68d4ac066399b61b3
2012-04-02 15:57:53 -04:00
Joe Drew
c7294996b9 Bug 741166 - Restore waitForValidSurface, removed in error in bug 737949. r=ajuma 2012-04-02 15:43:21 -04:00
Geoff Brown
0cde955529 Bug 740146 - Remove unused screenshot code. r=blassey 2012-04-01 15:17:32 -04:00
Kartikaya Gupta
7eeadaf018 Bug 740539 - Account for possible mismatch in zoom levels when handling Viewport:PageSize. r=Cwiiis 2012-04-01 14:30:35 -04:00
Jeff Muizelaar
ac11a30e7e Bug 740061. Remove unused skip functionality. r=kats
mSkipTextureUpdate is never set to true.
2012-03-31 13:36:42 -04:00
Jeff Muizelaar
b8472ed40d Bug 740061. Remove support for subuploads. r=kats
Since, the dirtyRect is either the size of the buffer
or empty we don't need to support subuploads anymore.
2012-03-31 13:30:11 -04:00
Jeff Muizelaar
a20af99e95 Bug 740061. Remove unused isDirty. r=kats 2012-03-31 13:05:05 -04:00
Jeff Muizelaar
e2e0ee3b02 Bug 740061. Use set() instead of union(). r=kats
mBufferrRect is either new Rect(0, 0, bufferSize.width, bufferSize.height)
or Rect() so we can just set() instead of unioning. This is cheaper
and avoids an allocation.
2012-03-31 13:04:14 -04:00
Jeff Muizelaar
e24bb20a4b Bug 740061. Remove unused invalidate(rect). r=kats 2012-03-31 13:02:37 -04:00
Jeff Muizelaar
a218512f66 Bug 740983. Remove unneeded invalidate from scrollbar layers. r=kats
We used to fade the scrollbars by reuploading textures
rather than using a shader. Since the textures don't change anymore
the invalidate is unneeded.
2012-03-30 17:22:59 -04:00
Joe Drew
500b32e0e5 Bug 737949 - Don't initialize EGL from Fennec java code, and remove GLThread altogether. r=pcwalton,jrmuizel 2012-03-30 10:50:54 -07:00
Kartikaya Gupta
75e73b1e36 Bug 740569 - Make the display port strategy preffable. r=Cwiiis 2012-03-30 09:57:39 -04:00
Kartikaya Gupta
c57c560898 Bug 737553 - Refactor much of the code in DisplayPortCalculator and tune some of the behaviour. r=Cwiiis
Commonly reused pieces of code are pulled out into reusable functions in DisplayPortCalculator.
Reusing these functions makes the individual strategies' code much clearer and the similarities
between them more apparent. One actual bug was fixed, where the display port resolution was
incorrectly calculated in the DynamicResolutionStrategy. Prior to this change, it did not apply
the reshaping algorithm to the pre-velocity display port size, resulting in a different resolution
in some cases which would leave the content blurry. Additionally, the FixedMarginStrategy was
modified so that its margins are a multiple of the view size rather than constant pixel values.
2012-03-30 09:47:22 -04:00
Kartikaya Gupta
068ccaf6ce Bug 737553 - Fix null handling in DisplayPortCalculator. r=Cwiiis 2012-03-30 09:46:27 -04:00
Ali Juma
c76d5246fb Bug 735230 - Part 3: Use the new compositor pause/resume events. r=kats 2012-03-28 18:00:38 -04:00
Jeff Muizelaar
aa68f27a16 Bug 738188. Avoid crashing by disabling the screenshot drawing code. r=kats
The crashes seem to be caused by SurfaceChange breaking any future
onDrawFrame calls. We don't seem to handle renewing the context at all. I added
mController.disposeGLContext(); mController.initGLContext(); to the
SizeChange::run() but that doesn't seem to fix it.

Bug 739867 will add this support back.

--HG--
extra : rebase_source : a4f71b22f381756c4285311cd3288b3ef46d5543
2012-03-27 21:43:56 -04:00
Kartikaya Gupta
49319e3671 Bug 729528 - Delete some unneeded things. r=Cwiiis 2012-03-26 13:15:50 -04:00
Kartikaya Gupta
013f913f27 Bug 729528 - Add an alternate strategy with a margin that is a multiple of view-size and shifts it with velocity bias. r=Cwiiis 2012-03-26 13:15:50 -04:00
Kartikaya Gupta
f5a59a4781 Bug 729528 - Add an alternate strategy where we have no display port, to better isolate problems in layout/draw code. r=Cwiiis 2012-03-26 13:15:50 -04:00
Kartikaya Gupta
0d6885cc9e Bug 729528 - Add an alternate code path (selected at compile-time) to render low-res content while panning. r=Cwiiis 2012-03-26 13:15:50 -04:00
Kartikaya Gupta
b314281113 Bug 729528 - Move displayport calculation and comparison code into a DisplayPortCalculator class. No functional changes intended. r=Cwiiis 2012-03-26 13:15:50 -04:00
Kartikaya Gupta
11ef39eb64 Bug 729528 - Add a DisplayPortMetrics to track the requested display resolution along with the area. r=Cwiiis 2012-03-26 13:15:49 -04:00
Brian Nicholson
2407276a27 Bug 725428 - Draw white background in LayerView until Gecko has painted. r=kats 2012-03-22 15:07:00 -07:00
Brian Nicholson
89ae98ddcd Backout 017f6dd98dc0 for robocop failures 2012-03-22 17:28:13 -07:00
Brian Nicholson
0a128bef50 Bug 725428 - Draw white background in LayerView until Gecko has painted. r=kats 2012-03-22 15:07:00 -07:00
Geoff Brown
8dda642283 Bug 737411 - Robocop: update reflection references; r=kats 2012-03-22 13:35:19 -04:00
Chris Lord
ebc07011a5 Bug 736729 - Fix display-port on first paint and page-size changes. r=kats
Previously, we only set the display-port in response to a page scrolling itself,
or when we adjust the viewport. This meant that the display-port could be
incorrect if a viewport adjustment was sent after a page-size changed, but
before a render had completed.

Similarly, we were not updating the display-port when the viewport of a
foreground document that hadn't been displayed yet was changing. This would
cause the first-paint to have an incorrect (and often too small) display port,
which wouldn't be corrected until the page was scrolled.
2012-03-21 14:44:33 +00:00
Kartikaya Gupta
423c8d4298 Bug 737630 - Remove duplicated code from beginDrawing. r=pcwalton 2012-03-20 16:55:28 -04:00
Kartikaya Gupta
7968d9bc1e Bug 731603 - Save the display port and resolution in the VirtualLayer's mPosition and mResolution fields. r=Cwiiis 2012-03-20 00:07:42 -04:00
Kartikaya Gupta
f83cb46c1d Bug 731603 - Propagate a layersUpdated flag to Java for robocop use. r=ajuma 2012-03-20 00:06:56 -04:00
Kartikaya Gupta
3e34d0c2b0 Bug 731603 - Propagate the resolution of the painted content into syncViewportInfo as well. r=Cwiiis 2012-03-20 00:05:45 -04:00
Ali Juma
b47f9ac031 Bug 737031 - Add EGL error code to error messages in GLController. r=bgirard 2012-03-19 13:35:13 -04:00
William Lachance
7a7f1529a8 Bug 736610 - Code to set checkerboard to flat color broken with Maple merge. r=pwalton 2012-03-18 13:26:54 -04:00
William Lachance
4c1c7c0bae Bug 734003 - Using white as the base checkerboard color doesn't work. r=pwalton 2012-03-18 13:25:13 -04:00
Chris Lord
c456a36f39 Bug 732756 - Fix overdrawing of checkerboard. r=kats
Fix overdrawing of the checkerboard layer by letting layers have a concept of
a display-port, and keeping the root layer's display port in track with
Gecko's.
2012-03-17 15:08:22 +00:00
Ryan VanderMeulen
2f1650c3ae Backout d5b66e64cf44 (bug 732756) to see if it fixes Android crashtests. 2012-03-16 17:17:22 -04:00
Chris Lord
7907635f98 Bug 732756 - Fix overdrawing of checkerboard. r=kats
Fix overdrawing of the checkerboard layer by letting layers have a concept of
a display-port, and keeping the root layer's display port in track with
Gecko's.
2012-03-16 16:30:23 +00:00
Ali Juma
9b55f84e74 Bug 736205 - Make GLController.disposeGLContext actually destroy the context. r=bgirard 2012-03-15 15:58:32 -04:00
Ali Juma
7600a9a801 Bug 736099 - Prevent a null pointer dereference in GLController.disposeGLContext. r=kats 2012-03-15 15:57:54 -04:00
Kartikaya Gupta
e5c84b3aae Bug 736125 - Fix Java 7 compile warnings. r=sriram 2012-03-15 15:01:52 -04:00
Kartikaya Gupta
0435827509 Bug 735612 - Remove unneeded call to notifyLayerClientOfGeometryChange. r=Cwiiis 2012-03-15 10:43:32 -04:00
Kartikaya Gupta
883f015b2b Bug 729646 - Allow Java to update the display port on background tabs as well, so that we draw the right thing upon switching to it. r=Cwiiis 2012-03-15 10:38:43 -04:00
Kartikaya Gupta
95c636bad1 Bug 729646 - Remove some annoying logging. r=Cwiiis 2012-03-15 10:38:43 -04:00
James Willcox
fb9607dbb7 Bug 728371 - Make Flash work with GLES 2.0 and GL layers r=pcwalton
--HG--
extra : rebase_source : 4b845e7dc4224bfd807fb757e7199c91655c0d69
2012-03-12 13:03:54 -04:00
Kartikaya Gupta
17908435d6 Back out 89833e1b3016 (bug 707571) as it is broken with the new maple rewrite. r=backout 2012-03-13 17:11:28 -04:00
Kartikaya Gupta
f8a8d4a442 Bug 725095 - Various fixes to get maple ready to land on m-c. r=Cwiiis
- Disable fps layer.
- Add some comments to FlexibleGLSurfaceView.
- Get rid of getBufferSize and some other related cleanup.
- Add some comments to compositor-invoked functions in GeckoLayerClient.
- Take out unnecessary parameters to Rect constructor.
- Move class variable initialization to constructor.
- Take out kUsingGLLayers.
- Add a comment about changes in background color.
- Fix up convertViewPointToLayerPoint to be more correct.
- Add note in setPositionAndResolution about how it might be wrong.
- Modify provideEGLSurface to not store the surface in mEGLSurface.
- Remove some unneeded, commented out code in GLThread.
2012-03-12 16:20:19 -04:00
Kartikaya Gupta
27d3658b62 Bug 735180 - Remove max(0,..) clamps when calculating display port margins; negative margins are needed during overscroll. r=Cwiiis 2012-03-13 12:14:25 -04:00
Ehsan Akhgari
39bfe969ec Backout changeset d2340d74fc19 because of bug 735076 2012-03-12 18:51:44 -04:00
Chris Lord
812a652c60 Bug 732756 - Fix layers with a mask appearing squashed. r=pcwalton
If a mask was set on a layer, each sub-rectangle would end up drawing with the
full texture extents.
2012-03-12 18:49:01 +00:00
James Willcox
2edc6422b3 Bug 728371 - Make Flash work with GLES 2.0 and GL layers r=pcwalton
--HG--
extra : rebase_source : f7a9eb9dab84cb35ba17fb1551051dae2e744d00
2012-03-12 13:03:54 -04:00