[gtk+] reftests: Fix rendering issues with border-image reftest



commit 6524d0b83d69eb9ad3eab6fe50e755ede935cfe8
Author: Benjamin Otte <otte redhat com>
Date:   Tue Nov 19 02:27:47 2013 +0100

    reftests: Fix rendering issues with border-image reftest
    
    When downscaling images, Cairo apparently uses algorithms different
    enough to make this test trip over. So add the downscaled image as the
    reference instead of downscaling the previous reference image.
    
    Fixes the border-image reftest. For real now.

 testsuite/reftests/Makefile.am                     |    2 +
 .../border-image-3-balls-green-squished.png        |  Bin 0 -> 1847 bytes
 .../border-image-3-balls-yellow-squished.png       |  Bin 0 -> 1960 bytes
 testsuite/reftests/border-image-repeat.css         |   10 ++++++
 testsuite/reftests/border-image-repeat.ref.ui      |   32 ++++++++++----------
 testsuite/reftests/border-image-repeat.sh          |    4 +-
 6 files changed, 30 insertions(+), 18 deletions(-)
---
diff --git a/testsuite/reftests/Makefile.am b/testsuite/reftests/Makefile.am
index 4f052f2..30c471d 100644
--- a/testsuite/reftests/Makefile.am
+++ b/testsuite/reftests/Makefile.am
@@ -85,7 +85,9 @@ testdata = \
        border-image-ball-yellow.png \
        border-image-balls.png \
        border-image-3-balls-green.png \
+       border-image-3-balls-green-squished.png \
        border-image-3-balls-yellow.png \
+       border-image-3-balls-yellow-squished.png \
        border-image-excess-size.css \
        border-image-excess-size.ref.ui \
        border-image-excess-size.ui \
diff --git a/testsuite/reftests/border-image-3-balls-green-squished.png 
b/testsuite/reftests/border-image-3-balls-green-squished.png
new file mode 100644
index 0000000..1ecf314
Binary files /dev/null and b/testsuite/reftests/border-image-3-balls-green-squished.png differ
diff --git a/testsuite/reftests/border-image-3-balls-yellow-squished.png 
b/testsuite/reftests/border-image-3-balls-yellow-squished.png
new file mode 100644
index 0000000..151a879
Binary files /dev/null and b/testsuite/reftests/border-image-3-balls-yellow-squished.png differ
diff --git a/testsuite/reftests/border-image-repeat.css b/testsuite/reftests/border-image-repeat.css
index 61d331e..35db958 100644
--- a/testsuite/reftests/border-image-repeat.css
+++ b/testsuite/reftests/border-image-repeat.css
@@ -44,6 +44,11 @@ GtkButton {
   background-color: black;
 }
 
+#yellow-3-round {
+  background-image: url("border-image-3-balls-yellow-squished.png");
+  background-color: black;
+}
+
 #green {
   background-image: url("border-image-ball-green.png");
   background-color: black;
@@ -53,3 +58,8 @@ GtkButton {
   background-image: url("border-image-3-balls-green.png");
   background-color: black;
 }
+
+#green-3-round {
+  background-image: url("border-image-3-balls-green-squished.png");
+  background-color: black;
+}
diff --git a/testsuite/reftests/border-image-repeat.ref.ui b/testsuite/reftests/border-image-repeat.ref.ui
index 48765ab..b81e4c6 100644
--- a/testsuite/reftests/border-image-repeat.ref.ui
+++ b/testsuite/reftests/border-image-repeat.ref.ui
@@ -234,7 +234,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-stretch-hround0">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
@@ -262,7 +262,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-stretch-hround1">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
@@ -710,7 +710,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-repeat-hround0">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
@@ -738,7 +738,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-repeat-hround1">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
@@ -976,7 +976,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-stretch-round-vround0">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>
@@ -1004,7 +1004,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-stretch-round-vround1">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>
@@ -1088,7 +1088,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-repeat-round-vround0">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>
@@ -1116,7 +1116,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-repeat-round-vround1">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>
@@ -1186,7 +1186,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-round-hround0">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
@@ -1200,7 +1200,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-round-vround0">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>
@@ -1214,7 +1214,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-round-hround1">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
@@ -1228,7 +1228,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-round-vround1">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>
@@ -1326,7 +1326,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-space-round-vround0">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>
@@ -1368,7 +1368,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-space-round-vround1">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>
@@ -1718,7 +1718,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-space-hround0">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
@@ -1760,7 +1760,7 @@
         </child>
         <child>
           <object class="GtkToolbar" id="toolbar-round-space-hround1">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
diff --git a/testsuite/reftests/border-image-repeat.sh b/testsuite/reftests/border-image-repeat.sh
index 4be3907..58fb404 100755
--- a/testsuite/reftests/border-image-repeat.sh
+++ b/testsuite/reftests/border-image-repeat.sh
@@ -61,7 +61,7 @@ EOF
 cat << EOF
         <child>
           <object class="GtkToolbar" id="toolbar-$hrepeat-$vrepeat-hround$side">
-            <property name="name">yellow-3</property>
+            <property name="name">yellow-3-round</property>
             <property name="width_request">52</property>
             <property name="height_request">20</property>
             <property name="visible">True</property>
@@ -149,7 +149,7 @@ EOF
 cat << EOF
         <child>
           <object class="GtkToolbar" id="toolbar-$hrepeat-$vrepeat-vround$side">
-            <property name="name">green-3</property>
+            <property name="name">green-3-round</property>
             <property name="width_request">20</property>
             <property name="height_request">52</property>
             <property name="visible">True</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]