1. 09 Feb, 2015 1 commit
    • Emmanuele Bassi's avatar
      GL: Split GL context creation in two phases · 22e6f37c
      Emmanuele Bassi authored
      One of the major requests by OpenGL users has been the ability to
      specify settings when creating a GL context, like the version to use
      or whether the debug support should be enabled.
      
      We have a couple of requirements in terms of API:
      
       • avoid, if at all possible, the "C arrays of integers with
         attribute, value pairs", which are hard to write and hard
         to bind in non-C languages.
       • allow failing in a recoverable way.
       • do not make the GL context creation API a mess of arguments.
      
      Looking at prior art, it seems that a common pattern is to split the
      construction phase in two:
      
       • a first phase that creates a GL context wrapper object and
         does preliminary checks on the environment.
       • a second phase that creates the backend-specific GL object.
      
      We adopted a similar pattern:
      
       • gdk_window_create_gl_context() creates a GdkGLContext
       • gdk_gl_context_realize() creates the underlying resources
      
      Calling gdk_gl_context_make_current() also realizes the context, so
      simple GL users do not need to care. Advanced users will want to
      call gdk_window_create_gl_context(), set up the optional requirements,
      and then call gdk_gl_context_realize(). If either of these two steps
      fails, it's possible to recover by changing the requirements, or simply
      creating a new GdkGLContext instance.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=741946
      22e6f37c
  2. 08 Feb, 2015 2 commits
  3. 07 Feb, 2015 1 commit
  4. 06 Feb, 2015 6 commits
    • Benjamin Otte's avatar
      css: Move scale to GtkStyleProviderPrivate · 1116914e
      Benjamin Otte authored
      This way, we can remove it as a separate argument from
      gtk_css_value_compute() and allow computation to only depend on one
      thing: the style provider.
      1116914e
    • Benjamin Otte's avatar
      settings: Provide a default style cascade per scale · 808bfe0a
      Benjamin Otte authored
      This guarantees we only create 1 extra style cascade in total for hidpi
      and not one per style context.
      
      Style cascades are now nested like this:
      
      GtkSettings root cascade (scale == 1)
       |
       +-- GtkSettings per scale cascade (for any scale, no custom providers)
       |
       +-- GtkStyleContext custom cascade (for any scale, custom providers)
      
      This requires a bunch of care when changing cascade-related properties
      inside GtkStyleContext, so that it ends up with a properly setup
      cascade, but I think I got those cases right.
      
      The only thing we don't do yet is reverting to a GtkSettings cascade
      when the last custom provider is removed from a custom cascade.
      808bfe0a
    • Benjamin Otte's avatar
      stylecontext: Store the scale value in the cascade · 9209c4ea
      Benjamin Otte authored
      This is in preparation for the next commits.
      9209c4ea
    • Chun-wei Fan's avatar
      gdkglcontext-win32.h: Clean Up a Bit · 0b06b1e3
      Chun-wei Fan authored
      We don't have a Win32-specific ->upload_texture() anymore, so don't
      indicate so.  Left out this part from my previous commit.
      0b06b1e3
    • Chun-wei Fan's avatar
      GDK-Win32: Drop Win32-specific ->upload_texture() · 24e6bda2
      Chun-wei Fan authored
      The default ->upload_texture() works also for Windows since commit 27cf0fa3,
      as some of the problems described in 742953 also applied for GL core
      contexts on Windows as well before 27cf0fa3.  Clean up the GDK-Win32 code a
      little bit as a result.
      24e6bda2
    • Benjamin Otte's avatar
      treeview: Fix copy/paste bug · 93c3b90f
      Benjamin Otte authored
      Introduced in 7eecb164
      93c3b90f
  5. 05 Feb, 2015 30 commits