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

Side by Side Diff: cc/resources/picture_pile.cc

Issue 12471007: Part 8 of cc/ directory shuffles: resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture_pile.h ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "cc/base/region.h" 7 #include "cc/base/region.h"
8 #include "cc/picture_pile.h" 8 #include "cc/resources/picture_pile.h"
9 #include "cc/picture_pile_impl.h" 9 #include "cc/resources/picture_pile_impl.h"
10 10
11 namespace { 11 namespace {
12 // Maximum number of pictures that can overlap before we collapse them into 12 // Maximum number of pictures that can overlap before we collapse them into
13 // a larger one. 13 // a larger one.
14 const int kMaxOverlapping = 2; 14 const int kMaxOverlapping = 2;
15 // Maximum percentage area of the base picture another picture in the picture 15 // Maximum percentage area of the base picture another picture in the picture
16 // list can be. If higher, we destroy the list and recreate from scratch. 16 // list can be. If higher, we destroy the list and recreate from scratch.
17 const float kResetThreshold = 0.7f; 17 const float kResetThreshold = 0.7f;
18 // Layout pixel buffer around the visible layer rect to record. Any base 18 // Layout pixel buffer around the visible layer rect to record. Any base
19 // picture that intersects the visible layer rect expanded by this distance 19 // picture that intersects the visible layer rect expanded by this distance
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 FullyContainedPredicate pred(picture_rect); 150 FullyContainedPredicate pred(picture_rect);
151 picture_list.erase(std::remove_if(picture_list.begin(), 151 picture_list.erase(std::remove_if(picture_list.begin(),
152 picture_list.end(), 152 picture_list.end(),
153 pred), 153 pred),
154 picture_list.end()); 154 picture_list.end());
155 picture_list.push_back(Picture::Create(picture_rect)); 155 picture_list.push_back(Picture::Create(picture_rect));
156 } 156 }
157 157
158 } // namespace cc 158 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile.h ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698