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

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

Issue 13316003: Revert 191364 "cc: Add ‘chromium_code’: 1 to cc.gyp and cc_t..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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
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 "cc/resources/picture_pile.h" 5 #include "cc/resources/picture_pile.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/base/region.h" 10 #include "cc/base/region.h"
11 #include "cc/resources/picture_pile_impl.h" 11 #include "cc/resources/picture_pile_impl.h"
12 12
13 namespace { 13 namespace {
14 // Maximum number of pictures that can overlap before we collapse them into 14 // Maximum number of pictures that can overlap before we collapse them into
15 // a larger one. 15 // a larger one.
16 const size_t kMaxOverlapping = 2; 16 const int kMaxOverlapping = 2;
17 // Maximum percentage area of the base picture another picture in the picture 17 // Maximum percentage area of the base picture another picture in the picture
18 // list can be. If higher, we destroy the list and recreate from scratch. 18 // list can be. If higher, we destroy the list and recreate from scratch.
19 const float kResetThreshold = 0.7f; 19 const float kResetThreshold = 0.7f;
20 // Layout pixel buffer around the visible layer rect to record. Any base 20 // Layout pixel buffer around the visible layer rect to record. Any base
21 // picture that intersects the visible layer rect expanded by this distance 21 // picture that intersects the visible layer rect expanded by this distance
22 // will be recorded. 22 // will be recorded.
23 const int kPixelDistanceToRecord = 8000; 23 const int kPixelDistanceToRecord = 8000;
24 } 24 }
25 25
26 namespace cc { 26 namespace cc {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 FullyContainedPredicate pred(picture_rect); 152 FullyContainedPredicate pred(picture_rect);
153 picture_list.erase(std::remove_if(picture_list.begin(), 153 picture_list.erase(std::remove_if(picture_list.begin(),
154 picture_list.end(), 154 picture_list.end(),
155 pred), 155 pred),
156 picture_list.end()); 156 picture_list.end());
157 picture_list.push_back(Picture::Create(picture_rect)); 157 picture_list.push_back(Picture::Create(picture_rect));
158 } 158 }
159 159
160 } // namespace cc 160 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/resources/picture_layer_tiling_set.cc ('k') | trunk/src/cc/resources/prioritized_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698