[Libreoffice-commits] online.git: test/TileQueueTests.cpp wsd/TileDesc.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Tue Nov 29 02:46:04 UTC 2016


 test/TileQueueTests.cpp |   17 +++++++----------
 wsd/TileDesc.hpp        |    3 ++-
 2 files changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 95e682a647e21deaa45e4bf3c67818925e9402c6
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Mon Nov 28 21:44:09 2016 -0500

    Revert "loolwsd: combine tiles strictly in the same row only"
    
    This reverts commit b8c9163ac8ddfcc3035e95013a34fa0fe2315c80.
    
    Change-Id: I8279473209a376c963dc750c0ca4f68d23050e81
    Reviewed-on: https://gerrit.libreoffice.org/31338
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/test/TileQueueTests.cpp b/test/TileQueueTests.cpp
index 0491468..dea692b 100644
--- a/test/TileQueueTests.cpp
+++ b/test/TileQueueTests.cpp
@@ -109,27 +109,24 @@ void TileQueueTests::testTileCombinedRendering()
 
     const std::string resHor = "tilecombine part=0 width=256 height=256 tileposx=0,3840 tileposy=0,0 imgsize=0,0 tilewidth=3840 tileheight=3840";
     const TileQueue::Payload payloadHor(resHor.data(), resHor.data() + resHor.size());
-    const std::string resVer1 = "tile part=0 width=256 height=256 tileposx=0 tileposy=0 tilewidth=3840 tileheight=3840 ver=-1";
-    const TileQueue::Payload payloadVer1(resVer1.data(), resVer1.data() + resVer1.size());
-    const std::string resVer2 = "tile part=0 width=256 height=256 tileposx=0 tileposy=3840 tilewidth=3840 tileheight=3840 ver=-1";
-    const TileQueue::Payload payloadVer2(resVer2.data(), resVer2.data() + resVer2.size());
-    const std::string resFull = "tilecombine part=0 width=256 height=256 tileposx=0,3840 tileposy=0,0 imgsize=0,0 tilewidth=3840 tileheight=3840";
+    const std::string resVer = "tilecombine part=0 width=256 height=256 tileposx=0,0 tileposy=0,3840 imgsize=0,0 tilewidth=3840 tileheight=3840";
+    const TileQueue::Payload payloadVer(resVer.data(), resVer.data() + resVer.size());
+    const std::string resFull = "tilecombine part=0 width=256 height=256 tileposx=0,3840,0 tileposy=0,0,3840 imgsize=0,0,0 tilewidth=3840 tileheight=3840";
     const TileQueue::Payload payloadFull(resFull.data(), resFull.data() + resFull.size());
 
     TileQueue queue;
 
-    // Horizontal - combine both.
+    // Horizontal.
     queue.put(req1);
     queue.put(req2);
     CPPUNIT_ASSERT_EQUAL(payloadHor, queue.get());
 
-    // Vertical - not combined.
+    // Vertical.
     queue.put(req1);
     queue.put(req3);
-    CPPUNIT_ASSERT_EQUAL(payloadVer1, queue.get());
-    CPPUNIT_ASSERT_EQUAL(payloadVer2, queue.get());
+    CPPUNIT_ASSERT_EQUAL(payloadVer, queue.get());
 
-    // Vertical - combine first row only.
+    // Vertical.
     queue.put(req1);
     queue.put(req2);
     queue.put(req3);
diff --git a/wsd/TileDesc.hpp b/wsd/TileDesc.hpp
index 3e12408..765341d 100644
--- a/wsd/TileDesc.hpp
+++ b/wsd/TileDesc.hpp
@@ -104,7 +104,8 @@ public:
             return false;
         }
 
-        return other.getTilePosY() == getTilePosY();
+        return other.getTilePosY() + other.getTileHeight() >= getTilePosY() &&
+               other.getTilePosY() <= getTilePosY() + getTileHeight();
     }
 
     /// Serialize this instance into a string.


More information about the Libreoffice-commits mailing list