1. 21 Jul, 2018 1 commit
    • Michael Natterer's avatar
      Initial space invasion commit in GIMP · e09e563a
      Michael Natterer authored
      All babl formats now have a space equivalent to a color profile,
      determining the format's primaries and TRCs. This commit makes GIMP
      aware of this.
      
      libgimp:
      
      - enum GimpPrecision: rename GAMMA values to NON_LINEAR and keep GAMMA
        as deprecated aliases, add PERCEPTUAL values so we now have LINEAR,
        NON_LINEAR and PERCPTUAL for each encoding, matching the babl
        encoding variants RGB, R'G'B' and R~G~B~.
      
      - gimp_color_transform_can_gegl_copy() now returns TRUE if both
        profiles can return a babl space, increasing the amount of fast babl
        color conversions significantly.
      
      - TODO: no solution yet for getting libgimp drawable proxy buffers in
        the right format with space.
      
      plug-ins:
      
      - follow the GimpPrecision change.
      
      - TODO: everything else unchanged and partly broken or sub-optimal,
        like setting a new image's color profile too late.
      
      app:
      
      - add enum GimpTRCType { LINEAR, NON_LINEAR, PERCEPTUAL } as
        replacement for all "linear" booleans.
      
      - change gimp-babl functions to take babl spaces and GimpTRCType
        parameters and support all sorts of new perceptual ~ formats.
      
      - a lot of places changed in the early days of goat invasion didn't
        take advantage of gimp-babl utility functions and constructed
        formats manually. They all needed revisiting and many now use much
        simpler code calling gimp-babl API.
      
      - change gimp_babl_format_get_color_profile() to really extract a
        newly allocated color profile from the format, and add
        gimp_babl_get_builtin_color_profile() which does the same as
        gimp_babl_format_get_color_profile() did before. Visited all callers
        to decide whether they are looking for the format's actual profile,
        or for one of the builtin profiles, simplifying code that only needs
        builtin profiles.
      
      - drawables have a new get_space_api(), get_linear() is now get_trc().
      
      - images now have a "layer space" and an API to get it,
        gimp_image_get_layer_format() returns formats in that space.
      
      - an image's layer space is created from the image's color profile,
        change gimpimage-color-profile to deal with that correctly
      
      - change many babl_format() calls to babl_format_with_space() and take
        the space from passed formats or drawables
      
      - add function gimp_layer_fix_format_space() which replaces the
        layer's buffer with one that has the image's layer format, but
        doesn't change pixel values
      
      - use gimp_layer_fix_format_space() to make sure layers loaded from
        XCF and created by plug-ins have the right space when added to the
        image, because it's impossible to always assign the right space upon
        layer creation
      
      - "assign color profile" and "discard color profile" now require use
        of gimp_layer_fix_format_space() too because the profile is now
        embedded in all formats via the space.  Add
        gimp_image_assign_color_profile() which does all that and call it
        instead of a simple gimp_image_set_color_profile(), also from the
        PDB set-color-profile functions, which are essentially "assign" and
        "discard" calls.
      
      - generally, make sure a new image's color profile is set before
        adding layers to it, gimp_image_set_color_profile() is more than
        before considered know-what-you-are-doing API.
      
      - take special precaution in all places that call
        gimp_drawable_convert_type(), we now must pass a new_profile from
        all callers that convert layers within the same image (such as
        image_convert_type, image_convert_precision), because the layer's
        new space can't be determined from the image's layer format during
        the call.
      
      - change all "linear" properties to "trc", in all config objects like
        for levels and curves, in the histogram, in the widgets. This results
        in some GUI that now has three choices instead of two.
        TODO: we might want to reduce that back to two later.
      
      - keep "linear" boolean properties around as compat if needed for file
        pasring, but always convert the parsed parsed boolean to
        GimpTRCType.
      
      - TODO: the image's "enable color management" switch is currently
        broken, will fix that in another commit.
      e09e563a
  2. 14 Jul, 2018 1 commit
  3. 13 Jul, 2018 1 commit
  4. 11 Jul, 2018 1 commit
  5. 08 Jul, 2018 1 commit
  6. 06 Jul, 2018 1 commit
  7. 27 Jun, 2018 3 commits
  8. 24 Jun, 2018 2 commits
    • Jehan's avatar
      libgimpbase: fix declaration after statement and reset safecheck... · 49b4b1a5
      Jehan authored
      ... after each successful read().
      I completely missed this declaration after a statement during the review
      of !13 even though I saw another similar issue!
      
      Also let's reset the error counter to 0 each time a successful read()
      happens so that we can continue reading even if a lot of EINTR were to
      happen, as long as we globally go forward. Only consecutive errors
      increment the counter.
      
      Finally add a small comment to explain why we let EINTR pass instead of
      breaking directly.
      49b4b1a5
    • Alex Samorukov's avatar
      Fix empty lldb backtrace on OSX · 559d9b89
      Alex Samorukov authored
      When lldb attaching to the process it triggers few "-1" errors on read with
      EINTR error. After 1-2 errors read() call works again.
      Also this patch fixing TID detection, syscall SYS_gettid is oficially deprecated
      now and does not work. Also adding safecheck to avoid enldless loop.
      559d9b89
  9. 18 Jun, 2018 1 commit
  10. 06 Jun, 2018 1 commit
    • Michael Natterer's avatar
      app, libgimp*: remove the config option to disable tooltips · b3620517
      Michael Natterer authored
      Also remove all traces of it from the plug-in protocol and raise the
      protocol version to 0x0100 (we now allow features and therefore
      version bumps in stable, and the master protocol version should always
      be higher). Fix the code that aborts plug-in startup on protocol
      version mismatch, we can't use gimp_message() because we have no
      protocol.
      b3620517
  11. 29 May, 2018 1 commit
    • Ell's avatar
      libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config · 97925de8
      Ell authored
      Pass the current icon theme directory to plug-ins through the
      config message, and add a gimp_icon_theme_dir() libgimp function
      for retrieving it.  Note that we already have a similar
      gimp_icon_get_theme_dir() PDB function, which we keep around, since
      it can be used to dynamically query for the current icon dir,
      unlike the former, and since it returns a dynamically-allocated
      string, while the rest of the config-related functions return
      statically allocated strings.
      
      Use the new function, instead of gimp_get_icon_theme_dir(), in
      gimp_ui_init().  This allows gimp_ui_init() to run without making
      any PDB calls.  Consequently, this allows us to start plug-ins that
      call gimp_ui_init() without entering the main loop in the main app.
      We're going to add a plug-in that displays an interactive dialog
      while the main app is blocking waiting for an operation to
      complete, and we need to be able to start the plug-in without
      entering the main loop, to avoid the possibility of arbitrary code
      being executed during the wait.
      
      Bump the protocol version.
      97925de8
  12. 25 May, 2018 1 commit
  13. 20 May, 2018 5 commits
  14. 18 May, 2018 2 commits
  15. 30 Apr, 2018 1 commit
    • Jehan's avatar
      libgimpbase: strengthen other use of g_win32_locale_filename_from_utf8() · 070bcb89
      Jehan authored
      Let's make our various usages of this broken function more robust, or at
      least return with errors when we can. But this is still seriously
      broken. Inside gimp_locale_directory() though, there was nothing I could
      do, so I just added a FIXME for at least keeping an eye on it.
      070bcb89
  16. 28 Apr, 2018 1 commit
  17. 26 Apr, 2018 1 commit
  18. 24 Apr, 2018 1 commit
    • Jehan's avatar
      Bug 795510 - SYS_gettid is not available on non-Linux system. · 106fc930
      Jehan authored
      I could not find for sure what to use on FreeBSD instead, so let's just
      not get this information there. It is quite useful information to know
      where thread traces were asked from, but it is more important to make
      sure the program can be compiled everywhere. Also we can just check
      which thread has gimp_stack_trace*() calls. Thus it can be seen as
      redundant information in any case.
      
      SYS_gettid is apparently defined as a macro, so let's simply check for
      it being defined.
      106fc930
  19. 18 Apr, 2018 1 commit
  20. 14 Apr, 2018 1 commit
  21. 13 Apr, 2018 1 commit
  22. 10 Apr, 2018 1 commit
    • Jehan's avatar
      libgimpbase: improve multi-threaded stack traces. · ae6a7bf9
      Jehan authored
      Since commit bb52431c, we get multi-thread traces in functions
      gimp_stack_trace_*(). Adding now the LLDB equivalent improvement.
      
      Also adding the process and thread id information, from which the trace
      order was made, atop the listing, as well as the thread list. This would
      allow to easily find and associate the threads.
      The problem is that sometimes the thread where we got a trace from may
      not matter (for instance signals, even such as SIGABRT or SIGSEGV, seem
      to sent a bit randomly to either the thread which provoked them or the
      main thread; there is a bit of contradictory info on this when reading
      on the topic, in my case I experienced this), in such case, getting all
      thread stack is important to find the origin of the signal.
      Other times it will highly matter, in particular when getting a trace
      for a WARNING or CRITICAL. This information will help to discriminate
      between thread traces.
      ae6a7bf9
  23. 09 Apr, 2018 2 commits
  24. 08 Apr, 2018 1 commit
    • Ell's avatar
      Makefiles: don't use -xobjective-c when linking files on Mac · 6ebc3f1b
      Ell authored
      Last commit caused -xobjective-c to be passed during linking on
      Mac, causing object files to be treated as source files.  Add a
      -xnone flag to AM_LDFLAGS, canceling the effect of -xobjective-c.
      
      Additinally, add a -xobjective-c++ flag to AM_CXXFLAGS, so that we
      can use Objective-C in C++ files on Mac, if we ever need to.
      6ebc3f1b
  25. 07 Apr, 2018 1 commit
  26. 04 Apr, 2018 1 commit
    • Jehan's avatar
      Bug 794949 - Plugin crash when opening png, jpeg or tiff with... · ba06a0fe
      Jehan authored
      ... non-latin unicode path.
      g_win32_locale_filename_from_utf8() was sometimes returning NULL for
      some paths on Windows. Then the call to gexiv2_metadata_open_path() with
      a NULL value was crashing plug-ins.
      This commit only prevents from crashing by simply failing to load
      metadata when this occurs, which means losing metadata support on
      Windows depending on filenames. A proper solution will have to be
      implemented.
      ba06a0fe
  27. 17 Mar, 2018 1 commit
  28. 15 Mar, 2018 2 commits
  29. 05 Mar, 2018 2 commits