drawinglayer/source/primitive2d/baseprimitive2d.cxx | 80 ++++++++++ drawinglayer/source/processor2d/vclhelperbufferdevice.cxx | 17 ++ drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 4 include/drawinglayer/primitive2d/baseprimitive2d.hxx | 2 include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx | 4 ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj | 8 + vcl/quartz/salbmp.cxx | 3 7 files changed, 116 insertions(+), 2 deletions(-)
New commits: commit e6b3ec87afa298fa425909398c5dae308f330a41 Author: Tor Lillqvist <t...@collabora.com> Date: Fri Apr 11 13:19:36 2014 +0300 Add MobileCoreServices and ImageIO frameworks for some debugging code in vcl Change-Id: I6eb0091d22ee5776e9be1bfde76860abc51a69b2 diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj b/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj index 61974d9..4d9ce0c 100644 --- a/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj +++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj @@ -19,6 +19,8 @@ BE82BDAC182190E400A447B5 /* TiledView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE82BDAB182190E400A447B5 /* TiledView.m */; }; BE82BDAF1821A1D000A447B5 /* View.m in Sources */ = {isa = PBXBuildFile; fileRef = BE82BDAE1821A1D000A447B5 /* View.m */; }; BECAB372186054DE00F814F9 /* lo.mm in Sources */ = {isa = PBXBuildFile; fileRef = BECAB371186054DE00F814F9 /* lo.mm */; }; + BED2593F18F6B87900C94C72 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BED2593E18F6B87900C94C72 /* ImageIO.framework */; }; + BED2594118F6B89000C94C72 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BED2594018F6B89000C94C72 /* MobileCoreServices.framework */; }; BEEE02D11860ABDB00FBDE67 /* program in Resources */ = {isa = PBXBuildFile; fileRef = BEEE02CE1860ABB700FBDE67 /* program */; }; BEEE02D21860ABDB00FBDE67 /* share in Resources */ = {isa = PBXBuildFile; fileRef = BEEE02CF1860ABB700FBDE67 /* share */; }; BEEE02D31860ABDB00FBDE67 /* ure in Resources */ = {isa = PBXBuildFile; fileRef = BEEE02D01860ABB700FBDE67 /* ure */; }; @@ -692,6 +694,8 @@ BE9F460A186839C100B8BE69 /* vtablefactory.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = vtablefactory.cxx; path = ../../../bridges/source/cpp_uno/shared/vtablefactory.cxx; sourceTree = "<group>"; }; BE9F460B186839C100B8BE69 /* vtables.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = vtables.cxx; path = ../../../bridges/source/cpp_uno/shared/vtables.cxx; sourceTree = "<group>"; }; BECAB371186054DE00F814F9 /* lo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = lo.mm; sourceTree = "<group>"; }; + BED2593E18F6B87900C94C72 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; + BED2594018F6B89000C94C72 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; BEDB0F08185B7537009A6F26 /* lo.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = lo.xcconfig; path = ../../../lo.xcconfig; sourceTree = "<group>"; }; BEEE02CE1860ABB700FBDE67 /* program */ = {isa = PBXFileReference; lastKnownFileType = folder; name = program; path = Resources/program; sourceTree = SOURCE_ROOT; }; BEEE02CF1860ABB700FBDE67 /* share */ = {isa = PBXFileReference; lastKnownFileType = folder; name = share; path = Resources/share; sourceTree = SOURCE_ROOT; }; @@ -713,6 +717,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + BED2594118F6B89000C94C72 /* MobileCoreServices.framework in Frameworks */, + BED2593F18F6B87900C94C72 /* ImageIO.framework in Frameworks */, BEEEF9661860741400FBDE67 /* libz.dylib in Frameworks */, BEEEF9641860740400FBDE67 /* libiconv.dylib in Frameworks */, BE82BD7818218E2E00A447B5 /* CoreGraphics.framework in Frameworks */, @@ -1286,6 +1292,8 @@ BE82BD7418218E2E00A447B5 /* Frameworks */ = { isa = PBXGroup; children = ( + BED2594018F6B89000C94C72 /* MobileCoreServices.framework */, + BED2593E18F6B87900C94C72 /* ImageIO.framework */, BEEEF9651860741400FBDE67 /* libz.dylib */, BEEEF9631860740400FBDE67 /* libiconv.dylib */, BE82BD7518218E2E00A447B5 /* Foundation.framework */, commit c03986e084e8806f66f7490f2aeeb33db5748e4b Author: Tor Lillqvist <t...@collabora.com> Date: Fri Apr 11 13:10:13 2014 +0300 "Fix" for some SmartArt rendering artefacts on iOS Exactly why this change works (to the extent that it does) is unclear to me. Whether it could possibly be used across all platforms and not for iOS is also unclear. Change-Id: I6dcf5982d51e5715b657dbf263a88776bbf55f4d diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index e94f581..d1045cc 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -332,9 +332,26 @@ namespace drawinglayer } else if(0.0 != fTrans) { +#ifndef IOS + // For some reason using this "normal" code path on + // iOS with tiled rendering causes horrible artefacts: + // The mask ends up being drawn too, ending up looking + // as translucent milky rectangles covering the + // SmartArt (which is what this typically (?) ends up + // being used for) ... Why this doesn't cause any + // artefacts on OS X, which uses largely the very same + // code in vcl/quartz, I don't know. sal_uInt8 nMaskValue((sal_uInt8)basegfx::fround(fTrans * 255.0)); const AlphaMask aAlphaMask(aSizePixel, &nMaskValue); mrOutDev.DrawBitmapEx(maDestPixel.TopLeft(), BitmapEx(aContent, aAlphaMask)); +#else + // Not sure at all why this works, but it does. The + // result is not beautiful (jaggies), but better than + // blocking out rectangles of the image. + Bitmap aMask(aContent); + aMask.Convert(BMP_CONVERSION_8BIT_GREYS); + mrOutDev.DrawBitmapEx(maDestPixel.TopLeft(), BitmapEx(aContent, aMask)); +#endif } else { commit b78caf96451de40f7aa54e5b555fa0195e3d0882 Author: Tor Lillqvist <t...@collabora.com> Date: Fri Apr 11 13:09:38 2014 +0300 Add a couple of SAL_INFOs using drawinglayer::primitive2d::idToString() Change-Id: I3fce5ca1af15714b8b20b1b273ccf41a49cb98ff diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 990aac0..73d12f3 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -926,6 +926,9 @@ namespace drawinglayer bDrawTransparentUsed = bAllowed && tryDrawPolygonStrokePrimitive2DDirect(*pPoStroke, rUniTransparenceCandidate.getTransparence()); break; } + default: + SAL_INFO("drawinglayer", "default case for " << drawinglayer::primitive2d::idToString(rCandidate.getPrimitive2DID())); + break; } } } @@ -1227,6 +1230,7 @@ namespace drawinglayer } default : { + SAL_INFO("drawinglayer", "default case for " << drawinglayer::primitive2d::idToString(rCandidate.getPrimitive2DID())); // process recursively process(rCandidate.get2DDecomposition(getViewInformation2D())); break; commit c45f5d759998d2443a9b27602396e419658b7359 Author: Tor Lillqvist <t...@collabora.com> Date: Fri Apr 11 13:03:17 2014 +0300 Introduce drawinglayer::primitive2d::idToString() debugging function Change-Id: I71e5b032d52f1fe3a1bde60fe6395c5d2d025885 diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index d61bafe..89f8ef1 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -18,6 +18,7 @@ */ #include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <basegfx/tools/canvastools.hxx> @@ -281,6 +282,85 @@ namespace drawinglayer } } + OUString idToString(sal_uInt32 nId) + { + switch( nId ) + { + case PRIMITIVE2D_ID_TRANSPARENCEPRIMITIVE2D: return OUString("TRANSPARENCE"); + case PRIMITIVE2D_ID_ANIMATEDSWITCHPRIMITIVE2D: return OUString("ANIMATEDSWITCH"); + case PRIMITIVE2D_ID_ANIMATEDBLINKPRIMITIVE2D: return OUString("ANIMATEDBLINK"); + case PRIMITIVE2D_ID_ANIMATEDINTERPOLATEPRIMITIVE2D: return OUString("ANIMATEDINTERPOLATE"); + case PRIMITIVE2D_ID_BACKGROUNDCOLORPRIMITIVE2D: return OUString("BACKGROUNDCOLOR"); + case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D: return OUString("BITMAP"); + case PRIMITIVE2D_ID_CONTROLPRIMITIVE2D: return OUString("CONTROL"); + case PRIMITIVE2D_ID_EMBEDDED3DPRIMITIVE2D: return OUString("EMBEDDED3D"); + case PRIMITIVE2D_ID_FILLGRAPHICPRIMITIVE2D: return OUString("FILLGRAPHIC"); + case PRIMITIVE2D_ID_FILLGRADIENTPRIMITIVE2D: return OUString("FILLGRADIENT"); + case PRIMITIVE2D_ID_FILLHATCHPRIMITIVE2D: return OUString("FILLHATCH"); + case PRIMITIVE2D_ID_GRAPHICPRIMITIVE2D: return OUString("GRAPHIC"); + case PRIMITIVE2D_ID_GRIDPRIMITIVE2D: return OUString("GRID"); + case PRIMITIVE2D_ID_GROUPPRIMITIVE2D: return OUString("GROUP"); + case PRIMITIVE2D_ID_HELPLINEPRIMITIVE2D: return OUString("HELPLINE"); + case PRIMITIVE2D_ID_MARKERARRAYPRIMITIVE2D: return OUString("MARKERARRAY"); + case PRIMITIVE2D_ID_MASKPRIMITIVE2D: return OUString("MASK"); + case PRIMITIVE2D_ID_MEDIAPRIMITIVE2D: return OUString("MEDIA"); + case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D: return OUString("METAFILE"); + case PRIMITIVE2D_ID_MODIFIEDCOLORPRIMITIVE2D: return OUString("MODIFIEDCOLOR"); + case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D: return OUString("POLYGONHAIRLINE"); + case PRIMITIVE2D_ID_POLYGONMARKERPRIMITIVE2D: return OUString("POLYGONMARKER"); + case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D: return OUString("POLYGONSTROKE"); + case PRIMITIVE2D_ID_POLYGONSTROKEARROWPRIMITIVE2D: return OUString("POLYGONSTROKEARROW"); + case PRIMITIVE2D_ID_POLYPOLYGONSTROKEPRIMITIVE2D: return OUString("POLYPOLYGONSTROKE"); + case PRIMITIVE2D_ID_POLYPOLYGONSTROKEARROWPRIMITIVE2D: return OUString("POLYPOLYGONSTROKEARROW"); + case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D: return OUString("POLYPOLYGONCOLOR"); + case PRIMITIVE2D_ID_POLYPOLYGONGRADIENTPRIMITIVE2D: return OUString("POLYPOLYGONGRADIENT"); + case PRIMITIVE2D_ID_POLYPOLYGONHATCHPRIMITIVE2D: return OUString("POLYPOLYGONHATCH"); + case PRIMITIVE2D_ID_POLYPOLYGONGRAPHICPRIMITIVE2D: return OUString("POLYPOLYGONGRAPHIC"); + case PRIMITIVE2D_ID_SCENEPRIMITIVE2D: return OUString("SCENE"); + case PRIMITIVE2D_ID_SHADOWPRIMITIVE2D: return OUString("SHADOW"); + case PRIMITIVE2D_ID_TEXTSIMPLEPORTIONPRIMITIVE2D: return OUString("TEXTSIMPLEPORTION"); + case PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D: return OUString("TEXTDECORATEDPORTION"); + case PRIMITIVE2D_ID_TRANSFORMPRIMITIVE2D: return OUString("TRANSFORM"); + case PRIMITIVE2D_ID_UNIFIEDTRANSPARENCEPRIMITIVE2D: return OUString("UNIFIEDTRANSPARENCE"); + case PRIMITIVE2D_ID_POINTARRAYPRIMITIVE2D: return OUString("POINTARRAY"); + case PRIMITIVE2D_ID_TEXTHIERARCHYFIELDPRIMITIVE2D: return OUString("TEXTHIERARCHYFIELD"); + case PRIMITIVE2D_ID_TEXTHIERARCHYLINEPRIMITIVE2D: return OUString("TEXTHIERARCHYLINE"); + case PRIMITIVE2D_ID_TEXTHIERARCHYPARAGRAPHPRIMITIVE2D: return OUString("TEXTHIERARCHYPARAGRAPH"); + case PRIMITIVE2D_ID_TEXTHIERARCHYBLOCKPRIMITIVE2D: return OUString("TEXTHIERARCHYBLOCK"); + case PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D: return OUString("TEXTHIERARCHYEDIT"); + case PRIMITIVE2D_ID_POLYGONWAVEPRIMITIVE2D: return OUString("POLYGONWAVE"); + case PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D: return OUString("WRONGSPELL"); + case PRIMITIVE2D_ID_TEXTEFFECTPRIMITIVE2D: return OUString("TEXTEFFECT"); + case PRIMITIVE2D_ID_TEXTHIERARCHYBULLETPRIMITIVE2D: return OUString("TEXTHIERARCHYBULLET"); + case PRIMITIVE2D_ID_POLYPOLYGONHAIRLINEPRIMITIVE2D: return OUString("POLYPOLYGONHAIRLINE"); + case PRIMITIVE2D_ID_EXECUTEPRIMITIVE2D: return OUString("EXECUTE"); + case PRIMITIVE2D_ID_PAGEPREVIEWPRIMITIVE2D: return OUString("PAGEPREVIEW"); + case PRIMITIVE2D_ID_STRUCTURETAGPRIMITIVE2D: return OUString("STRUCTURETAG"); + case PRIMITIVE2D_ID_BORDERLINEPRIMITIVE2D: return OUString("BORDERLINE"); + case PRIMITIVE2D_ID_POLYPOLYGONMARKERPRIMITIVE2D: return OUString("POLYPOLYGONMARKER"); + case PRIMITIVE2D_ID_HITTESTPRIMITIVE2D: return OUString("HITTEST"); + case PRIMITIVE2D_ID_INVERTPRIMITIVE2D: return OUString("INVERT"); + case PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D: return OUString("DISCRETEBITMAP"); + case PRIMITIVE2D_ID_WALLPAPERBITMAPPRIMITIVE2D: return OUString("WALLPAPERBITMAP"); + case PRIMITIVE2D_ID_TEXTLINEPRIMITIVE2D: return OUString("TEXTLINE"); + case PRIMITIVE2D_ID_TEXTCHARACTERSTRIKEOUTPRIMITIVE2D: return OUString("TEXTCHARACTERSTRIKEOUT"); + case PRIMITIVE2D_ID_TEXTGEOMETRYSTRIKEOUTPRIMITIVE2D: return OUString("TEXTGEOMETRYSTRIKEOUT"); + case PRIMITIVE2D_ID_EPSPRIMITIVE2D: return OUString("EPS"); + case PRIMITIVE2D_ID_DISCRETESHADOWPRIMITIVE2D: return OUString("DISCRETESHADOW"); + case PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D: return OUString("HIDDENGEOMETRY"); + case PRIMITIVE2D_ID_SVGLINEARGRADIENTPRIMITIVE2D: return OUString("SVGLINEARGRADIENT"); + case PRIMITIVE2D_ID_SVGRADIALGRADIENTPRIMITIVE2D: return OUString("SVGRADIALGRADIENT"); + case PRIMITIVE2D_ID_SVGLINEARATOMPRIMITIVE2D: return OUString("SVGLINEARATOM"); + case PRIMITIVE2D_ID_SVGRADIALATOMPRIMITIVE2D: return OUString("SVGRADIALATOM"); + case PRIMITIVE2D_ID_CROPPRIMITIVE2D: return OUString("CROP"); + case PRIMITIVE2D_ID_PATTERNFILLPRIMITIVE2D: return OUString("PATTERNFILL"); + case PRIMITIVE2D_ID_OBJECTINFOPRIMITIVE2D: return OUString("OBJECTINFO"); + case PRIMITIVE2D_ID_POLYPOLYGONSELECTIONPRIMITIVE2D: return OUString("POLYPOLYGONSELECTION"); + case PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D: return OUString("CLIPPEDBORDERLINE"); + case PRIMITIVE2D_ID_OPENGLPRIMITIVE2D: return OUString("OPENGL"); + default: return OUString::number((nId >> 16) & 0xFF) + "|" + OUString::number(nId & 0xFF); + } + } } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx index 94280d4..856c3d3 100644 --- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -286,6 +286,8 @@ namespace drawinglayer /// concatenate single Primitive2D void DRAWINGLAYER_DLLPUBLIC appendPrimitive2DReferenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DReference& rSource); + OUString DRAWINGLAYER_DLLPUBLIC idToString(sal_uInt32 nId); + } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx index 088d60e..3c4afe5 100644 --- a/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx +++ b/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx @@ -104,8 +104,8 @@ #define PRIMITIVE2D_ID_POLYPOLYGONSELECTIONPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 69) #define PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 70) #define PRIMITIVE2D_ID_OPENGLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 71) - - +// When you add a new primitive, please update the drawinglayer::primitive2d::idToString() function +// in drawinglayer/source/primitive2d/baseprimitive2d.cxx. #endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_DRAWINGLAYER_PRIMITIVETYPES2D_HXX commit 5c501c19aca3fcd8a00076d832a228e2e0fdbfe2 Author: Tor Lillqvist <t...@collabora.com> Date: Thu Apr 10 22:44:49 2014 +0300 Put writing the CGImages behind the env var DBG_WRITE_CGIMAGES Change-Id: I1eac909bfa0ff3a945c294a2d6f4cb1d454ac985 diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx index 5d6c400..138d0f1 100644 --- a/vcl/quartz/salbmp.cxx +++ b/vcl/quartz/salbmp.cxx @@ -53,6 +53,9 @@ static const unsigned long k32BitBlueColorMask = 0x000000ff; static void writeImageToFile(CGImageRef image, const char *baseName) { + static bool bDoIt = getenv("DBG_WRITE_CGIMAGES"); + if (!bDoIt) + return; static int counter = 0; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits