summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add GdkGLProfile and GdkGLError to the docswip/gdk-gl2Matthias Clasen2014-10-121-0/+2
|
* Pedantic formatting fixMatthias Clasen2014-10-121-3/+3
|
* Drop a reference to GtkGLArea::create-contextMatthias Clasen2014-10-111-2/+2
| | | | The signal no longer exists.
* Nitpicky documentation changesMatthias Clasen2014-10-111-7/+6
|
* Nitpicky documentation fixesMatthias Clasen2014-10-111-22/+26
|
* Correct another Since tagMatthias Clasen2014-10-111-1/+1
|
* Trivial formatting fixesMatthias Clasen2014-10-114-17/+22
|
* Correct copyright yearMatthias Clasen2014-10-111-1/+1
|
* Correct Since tagsMatthias Clasen2014-10-112-11/+13
|
* gl: Make gdk_gl_context_make_current() return voidAlexander Larsson2014-10-0913-91/+52
| | | | | | | | | | Its not really reasonable to handle failures to make_current, it basically only happens if you pass invalid arguments to it, and thats not something we trap on similar things on the X drawing side. If GL is not supported that should be handled by the context creation failing, and anything going wrong after that is essentially a critical (or an async X error).
* X11 GdkGLContext: Remove spurious XSyncAlexander Larsson2014-10-091-3/+0
| | | | | This XSync doesn't seem to be necessary. Remove it until otherwise proven.
* Fix warningAlexander Larsson2014-10-091-1/+0
|
* gl: Make all user GdkGLContexts not attached to any windowAlexander Larsson2014-10-0910-61/+164
| | | | | | We make user facing gl contexts not attached to a surface if possible, or attached to dummy surfaces. This means nothing can accidentally read/write to the toplevel back buffer.
* Add glarea demo to gtk3-demoAlexander Larsson2014-10-093-0/+186
|
* Add tests/testglblendingAlexander Larsson2014-10-092-0/+100
| | | | | This test stacks GL and cairo rendering in various orders to test the layer handling.
* Add tests/gdkgearsAlexander Larsson2014-10-094-0/+736
| | | | A more complex test modeled on the traditional glxgears.
* Add tests/testglareaAlexander Larsson2014-10-092-0/+160
| | | | This is a very simple test of GtkGLArea.
* Add GtkGLArea widgetAlexander Larsson2014-10-096-1/+767
|
* wayland: Add OpenGL supportAlexander Larsson2014-10-0910-10/+624
| | | | This uses EGL to implement GdkGLContext for wayland.
* wayland: Set GdkVisual::bits_per_rgb to 8Alexander Larsson2014-10-091-0/+1
| | | | This was 0 before.
* Add GDK_ALWAYS_USE_GL debug hackAlexander Larsson2014-10-091-0/+17
| | | | | If this is set we always use GL to render each window, even if there are no GL widgets in the window.
* gdk: Add support for OpenGLAlexander Larsson2014-10-0926-32/+2342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the new type GdkGLContext that wraps an OpenGL context for a particular native window. It also adds support for the gdk paint machinery to use OpenGL to draw everything. As soon as anyone creates a GL context for a native window we create a "paint context" for that GdkWindow and switch to using GL for painting it. This commit contains only an implementation for X11 (using GLX). The way painting works is that all client gl contexts draw into offscreen buffers rather than directly to the back buffer, and the way something gets onto the window is by using gdk_cairo_draw_from_gl() to draw part of that buffer onto the draw cairo context. As a fallback (if we're doing redirected drawing or some effect like a cairo_push_group()) we read back the gl buffer into memory and composite using cairo. This means that GL rendering works in all cases, including rendering to a PDF. However, this is not particularly fast. In the *typical* case, where we're drawing directly to the window in the regular paint loop we hit the fast path. The fast path uses opengl to draw the buffer to the window back buffer, either by blitting or texturing. Then we track the region that was drawn, and when the draw ends we paint the normal cairo surface to the window (using texture-from-pixmap in the X11 case, or texture from cairo image otherwise) in the regions where there is no gl painted. There are some complexities wrt layering of gl and cairo areas though: * We track via gdk_window_mark_paint_from_clip() whenever gtk is painting over a region we previously rendered with opengl (flushed_region). This area (needs_blend_region) is blended rather than copied at the end of the frame. * If we're drawing a gl texture with alpha we first copy the current cairo_surface inside the target region to the back buffer before we blend over it. These two operations allow us full stacking of transparent gl and cairo regions.
* Add gdk_window_mark_paint_from_clip and call from widget drawingAlexander Larsson2014-10-094-0/+26
| | | | | | | This is a new function that gets called every time we're drawing some area in the Gtk paint machinery. It is a no-op right now, but it will be required later to keep track of what areas which we previously rendered with GL was overwritten with cairo contents.
* Change the way the update area is tracked during paintAlexander Larsson2014-10-092-7/+46
| | | | | | | | | | | First of all we track the current update area during an update in window->active_update_area. This will be used later in end_paint to know the damaged area. Secondly we keep track of old update areas for the last 2 frames. This will later allow us to reuse old framebuffer contents in double or tripple buffer setups, only painting what has changed since then.
* Add internal gdk_cairo_region_from_clip helperAlexander Larsson2014-10-092-2/+39
| | | | | This extract the current cairo clip region if possible and returns it as a cairo_region_T. It will be needed by later code.
* build: Require libepoxyEmmanuele Bassi2014-10-091-1/+2
| | | | | | | | | | | | | | | | If we want to use OpenGL in GDK then we have two choices; either: - find the GL headers on each platform - do extension discovery - implement all the crazy dlopen()/dlsym() dispatch tables *or* use libepoxy, which shields us from all this madness and provides a decent layer for GL clients to use, without creating its own namespace. Epoxy is also used by other projects, like Xorg and piglit, and it's portable to all the platforms GDK cares about. https://bugzilla.gnome.org/show_bug.cgi?id=119189
* Remove an unused internal exportMatthias Clasen2014-10-092-3/+2
| | | | | _gtk_scrolled_window_get_scrollbar_spacing is only used in gtkscrolledwindow.c, so keep it there.
* ColorChooser: Fix an off-by-one errorMatthias Clasen2014-10-091-2/+2
| | | | | We were not filling the last free space in the custom color row.
* Adwaita: color button changesLapo Calamandrei2014-10-083-11/+16
| | | | | | | Dimmed inner colorswatch shadow to make brighter colors looks nice, increased the padding to make button states more evident, 0 border radius to match the padding change and no colorswatch shadows when the button is insensitive.
* Distribute gtk/resources/ui/*.ui.hLars Uebernickel2014-10-081-0/+1
| | | | POTFILES references them.
* Adwaita: colorchooser style rewriteLapo Calamandrei2014-10-083-156/+144
| | | | | To reflect latest Benjamin changes. As a bonus the colorchooser looks better to me, same for the scss code.
* Adwaita: don't round scrolled window frame cornersLapo Calamandrei2014-10-083-5/+0
| | | | See https://bugzilla.gnome.org/show_bug.cgi?id=737985
* colorswatch: Use a better name for the overlayBenjamin Otte2014-10-084-10/+12
| | | | Name it .overlay and not .image
* colorswatch: Draw the image overlay over the whole widgetBenjamin Otte2014-10-081-9/+9
|
* themingbackground: Use fill() instead of clip() + paint()Benjamin Otte2014-10-081-6/+1
| | | | It's simpler code and I believe it's faster, too.
* themingbackground: Add a quick exit for default caseBenjamin Otte2014-10-082-5/+14
| | | | | In the case where the background is completely transparent, exit the rendering functions before doing any expensive calculations.
* themingbackground: Call shadow function directlyBenjamin Otte2014-10-081-13/+12
| | | | ... instead of having a custom function for it.
* themingbackground: Don't store (almost) unused variablesBenjamin Otte2014-10-081-15/+8
| | | | Instead, parse them directly to the one function that uses them.
* themingbackground: Don't store bg_color in structBenjamin Otte2014-10-081-4/+5
| | | | Instead, keep it as a separate variable.
* themingbackground: Use an array instead of 3 separate membersBenjamin Otte2014-10-081-34/+15
| | | | Simplifies code
* render: Make rendering the background a single functionBenjamin Otte2014-10-083-82/+54
|
* render: Overhaul gtk_render_handle()Benjamin Otte2014-10-081-17/+9
| | | | | | | | | | The code did weird things with drawing backgrounds sometimes but not really. Now it does this: (1) render a background (2) render a frame (3) render an icon - if no icon exists, draw the generic handle icon
* colorswatch: Render background properlyBenjamin Otte2014-10-083-13/+60
| | | | | | | | We want to render a background *and* the current color (if there is one). This also adds a custom function gtk_render_add_content_path() which adds the path of the current content area to a cairo_t.
* colorswatch: Remove an unused variableBenjamin Otte2014-10-081-5/+0
|
* colorswatch: Render focus with gtk_render_focus()Benjamin Otte2014-10-084-28/+31
|
* colorswatch: Simplify drawing codeBenjamin Otte2014-10-084-73/+73
| | | | | | | | This adds a CSS box (complete with padding and border) for the icon. The box is even drawn when no icon is present. Use the ".image" as the style class here instead of -active-color-badge. Use this box to draw the circle around the selection icon in Adwaita.
* More removal of deprecated APIMatthias Clasen2014-10-074-39/+63
|
* printing: Properly initialize auth_info in gtkprintbackend.cDariusz Gadomski2014-10-071-1/+1
| | | | | | | | auth_info should be a NULL-terminated array as it is used in e.g. g_strdupv invocations iterating over its elements until a NULL element is encountered. https://bugzilla.gnome.org/show_bug.cgi?id=737777
* Make touch-selection popovers font-inertMatthias Clasen2014-10-071-0/+1
| | | | | Just like context menus, these should not inherit font settings from the text view they are attached to.
* Add a style class for touch selection popoversMatthias Clasen2014-10-073-0/+14
|