1. 23 May, 2019 2 kayıt (commit)
  2. 22 May, 2019 37 kayıt (commit)
  3. 21 May, 2019 1 kayıt (commit)
    • Tomaž Vajngerl's avatar
      tdf#124271 use the bitmap context, handle scaling · 959e8ae7
      Tomaž Vajngerl yazdı
      The problem with latest macOS versions is that creating a graphic
      context with window (NSGraphicsContext graphicsContextWithWindow:)
      only works when actually drawing and otherwise it returns null.
      This caused problems before in AquaVrtualDevice, but we also use
      this when creating a device backing storage. This interestingly
      caused slowdowns and eventual crash, but the backtrace looked
      very misterious as it didn't crash because of a nullptr, but
      it halted all drawing commands and it crashed because of that.
      
      This changes the graphic context with a bitmap context, as it
      was already done in VirtualDevice and use that instead. The
      problem with a bitmap context is that we need to handle HiDPI
      scaling by ourselves now.
      
      LayerHolder was extended to store the scaling information of the
      layer (and its underlaying bitmap context) and provides methods
      that get the size of the layer in pixels or in scaling independent
      points (which is just size in pixels multiplied by the scaling
      factor).
      
      An known issue is that VirtualDevice also needs to take scaling
      into account, which it currently doesn't, so the text is still
      blurry on a HiDPI screen, but that was already true previously
      and is something that will be done in a different change.
      
      Change-Id: I8e10c518ecba285125746bd20525c4cb5ca67279
      Reviewed-on: https://gerrit.libreoffice.org/72663
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      959e8ae7