Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2800)

Unified Diff: cc/layer.cc

Issue 11659004: Add support for tagging layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: exposing enum in cc. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer.h ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer.cc
diff --git a/cc/layer.cc b/cc/layer.cc
index 28cff9864bd9642365b933fc5b8ae7c6ed2a6ce5..4e6c6727980b3c4fb0b3836ae2564552d5f52e9e 100644
--- a/cc/layer.cc
+++ b/cc/layer.cc
@@ -58,6 +58,7 @@ Layer::Layer()
, m_boundsContainPageScale(false)
, m_layerAnimationDelegate(0)
, m_layerScrollClient(0)
+ , m_tags(kTagNone)
{
if (m_layerId < 0) {
s_nextLayerId = 1;
@@ -846,6 +847,26 @@ ScrollbarLayer* Layer::toScrollbarLayer()
return 0;
}
+void Layer::setTags(unsigned int tags)
+{
+ m_tags = tags;
+}
+
+unsigned int Layer::getTags() const
+{
+ return m_tags;
+}
+
+void Layer::addTag(Tag tag)
+{
+ m_tags |= tag;
+}
+
+bool Layer::getTag(Tag tag) const
+{
+ return m_tags & tag;
+}
+
void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped_refptr<Layer> >::iterator, void*)
{
// Currently we don't use z-order to decide what to paint, so there's no need to actually sort Layers.
« no previous file with comments | « cc/layer.h ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698