summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Kant <pranav913@gmail.com>2015-03-24 12:18:09 +0530
committerNoel Grandin <noelgrandin@gmail.com>2015-03-24 07:04:16 +0000
commit183f3791bad09cf95c2eee6e7bb043d7b00546a0 (patch)
tree369a3488f303f15b540d547e27f04245352f1947
parentc6c4d21847ef18ae7378e1a5a329000ea6547d18 (diff)
Reverts and correct "tdf#88230: Cleanup solar mutex yielding"
This reverts commit b15b97ee6b21be18d4ba5df396d39b6d3dab57e1. This commit directly used SolarMutexReleaser class which releases the solar mutex first and then acquires the mutex after the destruction of the object. This is not the correct way of replacing the pre-existing code where mutex needs to be acquired first and then released. Additionally, this commit adds a correct replacement for pre-existing code too. Change-Id: I79aff608d94ed2d4736679a691b8c18f8a23c581 Reviewed-on: https://gerrit.libreoffice.org/14981 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--sw/source/core/view/viewsh.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 59ee3b0e0957..ef705c108305 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1865,12 +1865,11 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
sleep(1);
}
+ // Creation, use and destruction of a VirtualDevice needs to be
+ // protected by the SolarMutex, it seems.
+ SolarMutexReleaser::AcquireSolarMutex(1);
if (pViewShell)
{
- // Creation, use and destruction of a VirtualDevice needs to be
- // protected by the SolarMutex, it seems.
- SolarMutexReleaser aReleaser;
-
SystemGraphicsData aData;
aData.rCGContext = (CGContextRef) context;
// the Size argument is irrelevant, I hope
@@ -1878,7 +1877,7 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
// paint to it
pViewShell->PaintTile(aDevice, contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight);
}
-
+ SolarMutexReleaser::ReleaseSolarMutex();
SAL_INFO("sw.tiled", "touch_lo_draw_tile(" << contextWidth << "x" << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ") return");
#else
(void) context;