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. 4 5 #include "ui/views/cull_set.h" 6 7 namespace views { 8 9 CullSet::CullSet() { 10 } 11 12 CullSet::~CullSet() { 13 } 14 15 CullSet::CullSet(scoped_ptr<base::hash_set<intptr_t> > cull_set) 16 : cull_set_(cull_set.Pass()) { 17 } 18 19 bool CullSet::ShouldPaint(const View* view) const { 20 if (cull_set_) 21 return (cull_set_->count(reinterpret_cast<intptr_t>(view)) > 0); 22 23 return true; 24 } 25 26 } // namespace views 27