summaryrefslogtreecommitdiff
path: root/gtk/gtkcssnodeprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-01-26 04:37:17 +0100
committerBenjamin Otte <otte@redhat.com>2020-01-28 02:17:03 +0100
commit170130f1d9c15e4274a24b9327fe01d36ad84290 (patch)
tree0a07692fba8a8b378ed08095480b7e5885fc3dd1 /gtk/gtkcssnodeprivate.h
parent6aac56e144e1088565db7d29591fc0bd9e3e509d (diff)
downloadgtk+-170130f1d9c15e4274a24b9327fe01d36ad84290.tar.gz
css: Add fast-path for parent selector matching
Add a fast path for parent selector matching that uses a bloom filter to quickly discard selectors that can't possibly match. Keep in mind that we match using a bloom filter, so we might accidentally include too many selectors when hash/bucket collisions occur. That's not a correctness problem though, because we'll do a real check afterwards. The idea for this change is taken from browsers, in particular WebKit.
Diffstat (limited to 'gtk/gtkcssnodeprivate.h')
-rw-r--r--gtk/gtkcssnodeprivate.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtkcssnodeprivate.h b/gtk/gtkcssnodeprivate.h
index 0dab08ab72..ae07da00cb 100644
--- a/gtk/gtkcssnodeprivate.h
+++ b/gtk/gtkcssnodeprivate.h
@@ -18,6 +18,7 @@
#ifndef __GTK_CSS_NODE_PRIVATE_H__
#define __GTK_CSS_NODE_PRIVATE_H__
+#include "gtkcountingbloomfilterprivate.h"
#include "gtkcssnodedeclarationprivate.h"
#include "gtkcssnodestylecacheprivate.h"
#include "gtkcssstylechangeprivate.h"
@@ -81,6 +82,7 @@ struct _GtkCssNodeClass
/* get frame clock or NULL (only relevant for root node) */
GdkFrameClock * (* get_frame_clock) (GtkCssNode *cssnode);
GtkCssStyle * (* update_style) (GtkCssNode *cssnode,
+ const GtkCountingBloomFilter *filter,
GtkCssChange pending_changes,
gint64 timestamp,
GtkCssStyle *old_style);