2011-01-20 Adrienne Walker <enne@google.com>
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 23:53:44 +0000 (23:53 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 23:53:44 +0000 (23:53 +0000)
        Reviewed by James Robinson.

        [chromium] Add a test for a render surface that the uses alpha channel.
        https://bugs.webkit.org/show_bug.cgi?id=52766

        * platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.checksum: Added.
        * platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.png: Added.
        * platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.txt: Added.
        * platform/chromium/compositing/render-surface-alpha-blending.html: Added.
2011-01-19  Adrienne Walker  <enne@google.com>

        Reviewed by James Robinson.

        [chromium] Composited render surfaces should allow writes to alpha channel.
        https://bugs.webkit.org/show_bug.cgi?id=52766

        Test: LayoutTests/platform/chromium/compositing

        * platform/graphics/chromium/LayerRendererChromium.cpp:
        (WebCore::LayerRendererChromium::drawLayers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76299 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.checksum [new file with mode: 0644]
LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/render-surface-alpha-blending.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp

index 580dbde0215f7a935a87abeb043cce0934a668de..b8b2f78d46f753878061c2fef190f32e514f04a0 100644 (file)
@@ -1,3 +1,15 @@
+2011-01-20  Adrienne Walker  <enne@google.com>
+
+        Reviewed by James Robinson.
+
+        [chromium] Add a test for a render surface that the uses alpha channel.
+        https://bugs.webkit.org/show_bug.cgi?id=52766
+
+        * platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.checksum: Added.
+        * platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.png: Added.
+        * platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.txt: Added.
+        * platform/chromium/compositing/render-surface-alpha-blending.html: Added.
+
 2011-01-14  Jer Noble  <jer.noble@apple.com>
 
         Reviewed by Eric Carlson.
diff --git a/LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.checksum b/LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.checksum
new file mode 100644 (file)
index 0000000..3cf4a4c
--- /dev/null
@@ -0,0 +1 @@
+f12f151e804c5ce584a4bdc588aa3c29
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.png b/LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.png
new file mode 100644 (file)
index 0000000..ab249a3
Binary files /dev/null and b/LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.png differ
diff --git a/LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.txt b/LayoutTests/platform/chromium-gpu/platform/chromium/compositing/render-surface-alpha-blending-expected.txt
new file mode 100644 (file)
index 0000000..3693021
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+layer at (0,0) size 800x600
+  RenderBlock (positioned) {DIV} at (0,0) size 800x600 [bgcolor=#C80000]
+layer at (0,0) size 800x600
+  RenderBlock (positioned) {DIV} at (0,0) size 800x600 [bgcolor=#006400]
+layer at (0,0) size 800x1
+  RenderBlock {DIV} at (0,0) size 800x1
+    RenderHTMLCanvas {CANVAS} at (0,0) size 1x1
diff --git a/LayoutTests/platform/chromium/compositing/render-surface-alpha-blending.html b/LayoutTests/platform/chromium/compositing/render-surface-alpha-blending.html
new file mode 100644 (file)
index 0000000..77ac70f
--- /dev/null
@@ -0,0 +1,32 @@
+<html>
+    <head>
+        <style>
+            #layer {
+                -webkit-transform:translateZ(0);
+                opacity: 0.75;
+                background-color: rgb(0, 100, 0);
+            }
+            #child {
+                -webkit-transform:translateZ(0);
+            }
+            #base {
+                background-color: rgb(200, 0, 0);
+            }
+
+            .fullpage {
+                position: fixed;
+                top: 0px;
+                left: 0px;
+                width: 100%;
+                height: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <div id="base" class="fullpage"></div>
+        <div id="layer" class="fullpage">
+            <!-- layer needs to have a child with content -->
+            <div id="child"><canvas width="1px" height="1px"></canvas></div>
+        </div>
+    </body>
+</html>
index 570d83e72eba53908144a0f2c63073a371a01a2d..fe29eb6b09d27b931eae23389e88067b554297c7 100644 (file)
@@ -1,3 +1,15 @@
+2011-01-19  Adrienne Walker  <enne@google.com>
+
+        Reviewed by James Robinson.
+
+        [chromium] Composited render surfaces should allow writes to alpha channel.
+        https://bugs.webkit.org/show_bug.cgi?id=52766
+
+        Test: LayoutTests/platform/chromium/compositing
+
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::drawLayers):
+
 2011-01-14  Jer Noble  <jer.noble@apple.com>
 
         Reviewed by Eric Carlson.
index 728339e3b862f92cb2d354996960d89e10812012..90eac742eefa1a78a59eaa52eef46621f267cb01 100644 (file)
@@ -263,6 +263,9 @@ void LayerRendererChromium::drawLayers(const IntRect& visibleRect, const IntRect
 
     updateAndDrawRootLayer(tilePaint, scrollbarPaint, visibleRect, contentRect);
 
+    // Re-enable color writes to layers, which may be partially transparent.
+    m_context->colorMask(true, true, true, true);
+
     // Set the root visible/content rects --- used by subsequent drawLayers calls.
     m_rootVisibleRect = visibleRect;
     m_rootContentRect = contentRect;