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
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.
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
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
SingleTileLayer draws upside-down and doesn't handle non-repeating/stretched
layers correctly.
--HG--
extra : rebase_source : d33dcecc949b252826f557033e47311f885bd9b8
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
Presumably this started happening after we stopped setting the
checkerboard color all of the time.
--HG--
extra : rebase_source : d9c76561256161335727d3e76c8a8aed37a36c97
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.
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.
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.
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.
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
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.
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.
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.
- 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.