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

Side by Side Diff: ui/views/cull_set.cc

Issue 275183002: patch from issue 218843002 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « ui/views/cull_set.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 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
OLDNEW
« no previous file with comments | « ui/views/cull_set.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698