cssnode: Implement the style cache
This essentially copies the previous cache implementation. With one caveat: It is now attached to and maintained by the CssNode, not by the CssStyle. And this is important because styles may be reused in incompatible situations which would cause cache collisions and lead to broken CSS in weird situations.
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#ifndef __GTK_CSS_NODE_STYLE_CACHE_PRIVATE_H__
|
||||
#define __GTK_CSS_NODE_STYLE_CACHE_PRIVATE_H__
|
||||
|
||||
#include "gtkcssnodedeclarationprivate.h"
|
||||
#include "gtkcssstyleprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
@ -25,6 +26,7 @@ G_BEGIN_DECLS
|
||||
typedef struct _GtkCssNodeStyleCache GtkCssNodeStyleCache;
|
||||
|
||||
GtkCssNodeStyleCache * gtk_css_node_style_cache_new (GtkCssStyle *style);
|
||||
GtkCssNodeStyleCache * gtk_css_node_style_cache_ref (GtkCssNodeStyleCache *cache);
|
||||
void gtk_css_node_style_cache_unref (GtkCssNodeStyleCache *cache);
|
||||
|
||||
GtkCssStyle * gtk_css_node_style_cache_get_style (GtkCssNodeStyleCache *cache);
|
||||
|
||||
Reference in New Issue
Block a user