mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 755070 - Scrolling causes after paint notifications which causes screenshotting which causes checkerboarding, follow up to use LinkedList instead of ArrayDequeu which is not supported on Froyo r=kats
--HG-- extra : rebase_source : d10393c4b2f445a6bb26f0a05359843308d84471
This commit is contained in:
parent
8333022286
commit
6e609bc90f
@ -2105,7 +2105,7 @@ public class GeckoAppShell
|
||||
}
|
||||
|
||||
class ScreenshotHandler {
|
||||
private static Queue<PendingScreenshot> sPendingScreenshots = new ArrayDeque<PendingScreenshot>();
|
||||
private static Queue<PendingScreenshot> sPendingScreenshots = new LinkedList<PendingScreenshot>();
|
||||
private static RectF sCheckerboardPageRect;
|
||||
private static float sLastCheckerboardWidthRatio, sLastCheckerboardHeightRatio;
|
||||
private static RepaintRunnable sRepaintRunnable = new RepaintRunnable();
|
||||
@ -2206,6 +2206,8 @@ class ScreenshotHandler {
|
||||
float sy = viewport.cssPageRectTop;
|
||||
float sw = viewport.cssPageRectRight - viewport.cssPageRectLeft;
|
||||
float sh = viewport.cssPageRectBottom - viewport.cssPageRectTop;
|
||||
if (sw == 0 || sh == 0)
|
||||
return;
|
||||
int maxPixels = Math.min(ScreenshotLayer.getMaxNumPixels(), sMaxTextureSize * sMaxTextureSize);
|
||||
// 2Mb of 16bit image data
|
||||
// may be bumped by up to 4x for power of 2 alignment
|
||||
@ -2231,6 +2233,8 @@ class ScreenshotHandler {
|
||||
static void scheduleCheckerboardScreenshotEvent(int tabId, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int bw, int bh) {
|
||||
float totalSize = sw * sh;
|
||||
int numSlices = (int) Math.ceil(totalSize / 100000);
|
||||
if (numSlices == 0)
|
||||
return;
|
||||
int srcSliceSize = (int) Math.ceil(sh / numSlices);
|
||||
int dstSliceSize = (int) Math.ceil(dh / numSlices);
|
||||
for (int i = 0; i < numSlices; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user