[Smart Lock] Add an API to hide error bubbles.
[chromium-blink-merge.git] / ui / views / cull_set.cc
blob65566e0b362fe71bcf26eed1bd869ab4aa474170
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/views/cull_set.h"
7 namespace views {
9 CullSet::CullSet() {
12 CullSet::~CullSet() {
15 CullSet::CullSet(scoped_ptr<base::hash_set<intptr_t> > cull_set)
16 : cull_set_(cull_set.Pass()) {
19 bool CullSet::ShouldPaint(const View* view) const {
20 if (cull_set_)
21 return (cull_set_->count(reinterpret_cast<intptr_t>(view)) > 0);
23 return true;
26 } // namespace views