mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 587320: Use proper paint counts on D2D due to dual pass rendering. r=joedrew
This commit is contained in:
parent
b4cb1a06e5
commit
3cbce0cdb6
@ -80,15 +80,32 @@ function show() {
|
||||
}
|
||||
|
||||
function invalidate() {
|
||||
is(clipped.getPaintCount(), 1, "partially clipped plugin painted once");
|
||||
|
||||
var paintCount = 1;
|
||||
try {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
if (Components.classes["@mozilla.org/gfx/info;1"].getService(Components.interfaces.nsIGfxInfo).D2DEnabled) {
|
||||
paintCount = 2;
|
||||
}
|
||||
} catch(e) {}
|
||||
|
||||
is(clipped.getPaintCount(), paintCount, "partially clipped plugin painted once");
|
||||
|
||||
clipped.setColor("FF00FF00"); // plugin invalidates
|
||||
|
||||
waitForPaint(done);
|
||||
}
|
||||
|
||||
function done() {
|
||||
is(clipped.getPaintCount(), 2, "painted after invalidate");
|
||||
var paintCount = 2;
|
||||
try {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
if (Components.classes["@mozilla.org/gfx/info;1"].getService(Components.interfaces.nsIGfxInfo).D2DEnabled) {
|
||||
paintCount = 4;
|
||||
}
|
||||
} catch(e) {}
|
||||
// With D2D we paint windowless plugin with 2 passes, 4 paints are expected.
|
||||
is(clipped.getPaintCount(), paintCount, "painted after invalidate");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user