Kaydet (Commit) 8b60382f authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Make the tiled rendering code compile for Android again

I just ifdeffed out iOS-specific code, no actual Android-specific code
added. And if at some stage we have need and resources to really make the
tiled rendering stuff saner and cross-platform, a lot will change of course.

Change-Id: If45d98f301413e26372c611f8ffecf229061174d
üst f3a59f58
...@@ -17,12 +17,8 @@ ...@@ -17,12 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#ifdef IOS
#include <touch/touch.h> #include <touch/touch.h>
#endif
#include <com/sun/star/accessibility/XAccessible.hpp> #include <com/sun/star/accessibility/XAccessible.hpp>
#include <sfx2/viewfrm.hxx> #include <sfx2/viewfrm.hxx>
#include <sfx2/progress.hxx> #include <sfx2/progress.hxx>
...@@ -1792,6 +1788,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex ...@@ -1792,6 +1788,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
extern "C" extern "C"
void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tileDpxPosition, MLODpxSize tileDpxSize) void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tileDpxPosition, MLODpxSize tileDpxSize)
{ {
#ifdef IOS
SAL_INFO("sw", "touch_lo_draw_tile(" << contextWidth << ", " << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ")"); SAL_INFO("sw", "touch_lo_draw_tile(" << contextWidth << ", " << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ")");
MLORipPoint tileRipPosition = MLORipPointByDpxPoint(tileDpxPosition); MLORipPoint tileRipPosition = MLORipPointByDpxPoint(tileDpxPosition);
MLORipSize rileRipSize = MLORipSizeByDpxSize(tileDpxSize); MLORipSize rileRipSize = MLORipSizeByDpxSize(tileDpxSize);
...@@ -1838,10 +1835,18 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD ...@@ -1838,10 +1835,18 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
aBitmap.ReleaseAccess(readAccess); aBitmap.ReleaseAccess(readAccess);
} }
Application::ReleaseSolarMutex(); Application::ReleaseSolarMutex();
#else
(void) context;
(void) contextWidth;
(void) contextHeight;
(void) tileDpxPosition;
(void) tileDpxSize;
#endif
} }
extern "C" extern "C"
MLODpxSize touch_lo_get_content_size() MLODpxSize touch_lo_get_content_size()
{ {
#ifdef IOS
SwWrtShell *pViewShell = GetActiveWrtShell(); SwWrtShell *pViewShell = GetActiveWrtShell();
if (pViewShell) if (pViewShell)
{ {
...@@ -1852,15 +1857,23 @@ MLODpxSize touch_lo_get_content_size() ...@@ -1852,15 +1857,23 @@ MLODpxSize touch_lo_get_content_size()
((MLORip)documentSize.Height()) + HEIGHT_ADDITION); ((MLORip)documentSize.Height()) + HEIGHT_ADDITION);
} }
return MLODpxSizeByDpxes(0,0); return MLODpxSizeByDpxes(0,0);
#else
return MLODpxSize();
#endif
} }
extern "C" extern "C"
MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint) MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint)
{ {
#ifdef IOS
//MLODpxSize contentSize = touch_lo_get_content_size(); //MLODpxSize contentSize = touch_lo_get_content_size();
MLORip x = MLORipByDpx(mloDpxPoint.x /*- (contentSize.width/2.0f)*/); MLORip x = MLORipByDpx(mloDpxPoint.x /*- (contentSize.width/2.0f)*/);
MLORip y = MLORipByDpx(mloDpxPoint.y); MLORip y = MLORipByDpx(mloDpxPoint.y);
return MLORipPointByRips(x,y); return MLORipPointByRips(x,y);
#else
(void) mloDpxPoint;
return MLORipPoint();
#endif
} }
extern "C" extern "C"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment