summaryrefslogtreecommitdiff
path: root/gsk
Commit message (Collapse)AuthorAgeFilesLines
* Broadway: Add id for nodes and reuse old onesAlexander Larsson2019-03-261-243/+338
| | | | | | | | | When sending render nodes from the client to the daemon we add an id, and whenever we're about to re-send the entire tree node we instead send the old id. We track all the nodes for the previous frame of the surface this way. Having the id on the daemon side will allow us do to much better deltas.
* Disable accidental debug spewAlexander Larsson2019-03-261-1/+1
|
* broadway: Simplify fallback node cacheAlexander Larsson2019-03-261-278/+48
| | | | | | Since nodes are now cached we just store the fallback as a texture in a hashtable indexed by the node. If its unused for 5 frames we drop it.
* broadway: Send actual float32, not some hackAlexander Larsson2019-03-261-8/+13
|
* Broadway: Add node for debug nodesAlexander Larsson2019-03-261-5/+35
| | | | This can be helpful when debugging broadway.
* broadway: Don't fall back for translation transform nodesAlexander Larsson2019-03-261-3/+33
| | | | These are trivial anyway
* renderer: Make gsk_renderer_is_realized() publicBenjamin Otte2019-03-193-5/+17
| | | | ... and add a property for it.
* renderer: Remove display propertyBenjamin Otte2019-03-193-89/+4
| | | | | Renderers don't need a display until they get realized. And once they get realized, they can look up the display from the surface.
* gsk: API docs fixesBastien Nocera2019-03-072-6/+3
| | | | | | | | | gsk/gskenums.h:181: Error: Gsk: multiple "@GSK_TRANSFORM_CATEGORY_2D" parameters for identifier "GskTransformCategory": * @GSK_TRANSFORM_CATEGORY_2D: The matrix is a 2D matrix. This is equivalent ^ gsk/gsktransform.c:1342: Warning: Gsk: gsk_transform_to_2d: unknown parameter 'm' in documentation comment, should be 'self' gsk/gsktransform.c:1368: Warning: Gsk: gsk_transform_to_2d: invalid return annotation gsk/gsktransform.c:1461: Warning: Gsk: gsk_transform_to_translate: unknown parameter 'm' in documentation comment, should be 'self'
* rendernode: Add can_diff implementation for transform nodesBenjamin Otte2019-03-061-1/+14
| | | | That one was missing and killing performance in the fishbowl.
* gl renderer: Cache rendered fallback nodesTimm Bäder2019-03-061-0/+13
|
* gl renderer: Mark pointer textures as usedTimm Bäder2019-03-061-0/+19
| | | | Otherwise we remove them, causing additional texture uploads.
* transform: Add perspective()Benjamin Otte2019-03-052-0/+117
| | | | | This commit adds gsk_transform_perspective(), gtk_snapshot_perspective() and support for perspective() in the CSS syntax.
* rendernode: Implement diffing of transform nodesBenjamin Otte2019-03-041-1/+63
| | | | | | | | This reinstates diffing in the same way that it worked for offset nodes. It would be possible to add diffing for affine transforms or even all transforms, but I think this is unnecessary right now - and also quite expensive to compute.
* transform: Readd optimizationBenjamin Otte2019-03-041-4/+28
| | | | This is the optimization from bbd4e2f60d9e060fbe3b0c2dcebcd1d6b7335a2a
* transform: Redo querying APIBenjamin Otte2019-03-044-178/+136
| | | | | | | | | | | Make the API expect a tranform of the proper category instead of doing the check ourselves and returning TRUE/FALSE. The benefit is that the mai use case is switch (transform->category) statements and in those we know the category and don't need to check TRUE/FALSE. Using the wrong matrix will now cause a g_warning().
* transform: Store the category in the transformBenjamin Otte2019-03-041-69/+30
| | | | | | | | ... instead of computing it every time we need it. This should be faster and we want to use it a lot more prominently. Also, we have the struct memory available anyway.
* transform: Implement gsk_transform_invert()Benjamin Otte2019-03-042-1/+120
| | | | | | And use it. And test it.
* transform: Remove gsk_transform_identity()Benjamin Otte2019-03-042-28/+1
| | | | | This used to be a good idea back when GskTransform was intended to be used for transitions, but without it, it's not anymore.
* trasnform: Fix print statementBenjamin Otte2019-03-041-1/+1
| | | | We were printing the wrong variable.
* transform: Split rotate() and rotate3d() classBenjamin Otte2019-03-041-33/+162
| | | | | This is mainly for accuracy: We can guarantee the math we do for 2D rotations results in a 2D matrix.
* transform: Make category public APIBenjamin Otte2019-03-049-105/+111
| | | | Also rename it from GskMatrixCategory to GskTransformCategory.
* transform: Remove API to poke internalsBenjamin Otte2019-03-042-75/+21
| | | | | It is not interesting to users of GskTransform how it is made up internally. Users should just use the gsk_transform_to_*() APIs.
* rendernode: Make the transform node take a GskTransformBenjamin Otte2019-03-045-92/+51
| | | | This is an attempt to push GskTransform deeper into the stack.
* transform: Add more APIBenjamin Otte2019-03-043-6/+324
| | | | | | | | | | In particular, add a per-category querying API for the matrix: - gsk_transform_to_translate() - gsk_transform_to_affine() - gsk_transform_to_2d() - gsk_transform_to_matrix() This way, code can use the relevant one for the given category.
* transform: Move to GSKBenjamin Otte2019-03-046-1/+1267
| | | | The renaming of the prefix makes this a large patch.
* roundedrect: Add gsk_rounded_rect_to_stringTimm Bäder2019-02-282-0/+23
| | | | Keep it private for now, but it's very useful when debugging.
* gl renderer: Change shadow cache eviction strategyTimm Bäder2019-02-281-5/+7
| | | | | | Since we can do partial redraws, dropping every shadow that's been unused for one frame happens too fast. This is also a problem when a shadow gets drawn on a texture for a few frames.
* gl renderer: Ignore nodes with nan boundsTimm Bäder2019-02-281-1/+2
| | | | | | This can happen for certain transform nodes. The transform node's child's bounds are fine, but the transform node bounds are all nan. Just ignore those bounds since we can't meaningfully render them anyway.
* transformnode: Avoid matrix multiplication if we canTimm Bäder2019-02-281-3/+24
| | | | | | If the given matrix is explicitly of category IDENTITY, we don't need to do anything, and in the 2D_TRANSLATE case, just offset the child bounds. Those are the two most common cases.
* gl renderer: Add more nodes that support transformsTimm Bäder2019-02-281-0/+3
|
* gl renderer: Remove GskRoundedRect initializaionTimm Bäder2019-02-251-3/+7
|
* gl renderer: Partially implement rounded rect intersectionTimm Bäder2019-02-251-13/+108
| | | | | Some rounded rect intersections can actually be done and even expressed as a single rounded rectangle.
* gl renderer: Add debug function to dump render nodeTimm Bäder2019-02-251-0/+24
|
* gl renderer: Stop determining the matrix category ourselvesTimm Bäder2019-02-253-146/+195
| | | | | Use the category we get from transform nodes and add ops_ API to supply one when we set a graphene_matrix_t directly.
* gl renderer: Round size up when rendering to a textureTimm Bäder2019-02-231-2/+2
| | | | | Both the clip we use and the viewport we set should contain the entire texture size and not potentially clip the last pixel.
* gl renderer: Use the matrix node categoryTimm Bäder2019-02-221-51/+103
|
* snapshot: Refactor text renderingBenjamin Otte2019-02-213-48/+9
| | | | | | The code didn't change, it was just shuffled around to make the with_bounds() versions of the text rendering unnecessary and instead pass through the generic append_node() path.
* snapshot: Add gtk_snapshot_append_border()Benjamin Otte2019-02-211-3/+4
| | | | This is adding functions for the remaining render nodes.
* gsk: Remove offset nodesBenjamin Otte2019-02-216-262/+3
| | | | | | | | | They were a neat idea while they lasted. But now, it's time for categorized transform nodes, where matrices with GSK_MATRIX_CATEGORY_2D_TRANSLATE are the exact replacement. Renderers have not been adapted for this purpose, so they (continue to) run slow paths.
* gsk: Add GskMatrixCategoryBenjamin Otte2019-02-212-4/+85
| | | | We'll use that soon.
* glglyphcache: Fix dropping caches unnecessarilyTimm Bäder2019-02-101-4/+5
| | | | | | | | | | The first set of glyphs is created with a timestamp of 1. Later we subtract the glyph timestamp from the cache timestamp, meaning we end up with numbers ending in 9, e.g. 59. Now unfortunately !(60 <= 59), so we do not end up incrasing the old_pixels count of the cache. Later we then call lookup() and DEcrease the old_pixels count, which makes the unsigned int wrap and cause a huge old_pixels value, which causes us to drop the cache.
* glglyphcache: Remove surface member from dirty glyphTimm Bäder2019-02-102-14/+7
| | | | We don't use it after we've rendered to it, just its size and data.
* Use @basename@ in enumeration type templatesEmmanuele Bassi2019-02-042-2/+2
| | | | | | The @filename@ directive will use the full path of the file being parsed for enumeration types; we should use @basename@, instead, as it improves the reproducibility of the build by using only the file name.
* build: Reintroduce warning flags from autotoolsBenjamin Otte2019-01-222-11/+10
| | | | | | | | | Some of the flags got lost in the meson transition or were demoted from error flags to warning flags. This commit reintroduces them. It also includes fixes for the code that had warnings with those flags. The big one being -Wshadow.
* gl renderer: Support (not) resetting the opacity for offscreen nodesTimm Bäder2019-01-181-16/+31
| | | | We usually want to do that, but it's wrong for e.g. crossfade nodes.
* gl renderer: Don't add clip ops if the clip didn't changeTimm Bäder2019-01-181-0/+4
|
* gl renderer: Force blur shadow node children offscreenTimm Bäder2019-01-131-1/+6
| | | | | | This broke the overlay blur demoe when resizing the window to a size that would completely move the image below a button, causing the GtkSnapshot code to remove the clip node below the blur node.
* gl renderer: Dont't try to draw glyphs at scale 0Timm Bäder2019-01-103-2/+5
| | | | Fixes #1475
* gl glyphcache: Only support one dirty glyph per atlasTimm Bäder2019-01-102-54/+38
|