Bug 635302: fix flipping logic to handle both single-buffered and double-buffered cases correctly. r=joe, a=hardblocker.

This commit is contained in:
Matt Woodrow 2011-02-20 11:19:11 +13:00
parent 066aec9326
commit 260ec13425
4 changed files with 67 additions and 1 deletions

View File

@ -334,7 +334,7 @@ ContainerRender(Container* aContainer,
DEBUG_GL_ERROR_CHECK(aContainer->gl());
aManager->BindAndDrawQuad(rgb, aPreviousFrameBuffer == 0);
aManager->BindAndDrawQuad(rgb, aManager->IsDrawingFlipped());
DEBUG_GL_ERROR_CHECK(aContainer->gl());

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html><head>
<style>
#outer {
opacity: 0.8;
background-color:red;
width: 200px;
}
#inner {
opacity: 0.6;
background-color:white;
color:white;
}
</style>
</head>
<body>
<div id="outer">
<div style="width:200px; height:200px; background:black;"></div>
<div id="inner">
<div style="width:200px; height:200px; background:black;"></div>
<div style="width:200px; height:200px; background:rgb(50,50,50);"></div>
</div>
</div>
</body></html>

View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html><head>
<style>
#outer {
opacity: 0.8;
background-color:red;
width: 200px;
}
#inner {
opacity: 0.6;
background-color:black;
color:white;
}
</style>
</head>
<body>
<div id="outer">
<canvas width="200" height="200" style="display:block;" id="c1"></canvas>
<div id="inner">
<canvas width="200" height="400" style="display:block;" id="c2"></canvas>
</div>
</div>
<script>
var ctx = document.getElementById("c1").getContext("2d");
ctx.fillStyle = "black";
ctx.fillRect(0, 0, 200, 200);
var ctx = document.getElementById("c2").getContext("2d");
ctx.fillStyle = "black";
ctx.fillRect(0, 0, 200, 200);
ctx.fillStyle = "rgb(50,50,50)";
ctx.fillRect(0, 200, 200, 200);
</script>
</body></html>

View File

@ -1613,3 +1613,4 @@ random-if(winWidget) HTTP(..) == 621918-2.svg 621918-2-ref.svg # same 1px issue
== 631352-1.html 631352-1-ref.html
fails-if(winWidget) == 632781-verybig.html 632781-ref.html # large canvas elements are not drawn on Windows, see bug 633936
== 632781-normalsize.html 632781-ref.html
== 635302-1.html 635302-1-ref.html