зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
17451560ae
Коммит
8c68f2a48d
|
@ -639,6 +639,15 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
|
|||
// Find out how much of the viewport area is valid
|
||||
Rect viewport = RectUtils.round(mPageContext.viewport);
|
||||
Region validRegion = rootLayer.getValidRegion(mPageContext);
|
||||
|
||||
/* restrict the viewport to page bounds so we don't
|
||||
* count overscroll as checkerboard */
|
||||
if (!viewport.intersect(mPageRect)) {
|
||||
/* if the rectangles don't intersect
|
||||
intersect() doesn't change viewport
|
||||
so we set it to empty by hand */
|
||||
viewport.setEmpty();
|
||||
}
|
||||
validRegion.op(viewport, Region.Op.INTERSECT);
|
||||
|
||||
float checkerboard = 0.0f;
|
||||
|
|
Загрузка…
Ссылка в новой задаче