OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_base.h" | 5 #include "cc/resources/picture_pile_base.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/debug/trace_event_argument.h" | 11 #include "base/debug/trace_event_argument.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "cc/base/math_util.h" | |
15 #include "cc/debug/traced_value.h" | 14 #include "cc/debug/traced_value.h" |
16 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
17 #include "ui/gfx/rect_conversions.h" | 16 #include "ui/gfx/geometry/rect_conversions.h" |
18 | 17 |
19 namespace { | 18 namespace { |
20 // Dimensions of the tiles in this picture pile as well as the dimensions of | 19 // Dimensions of the tiles in this picture pile as well as the dimensions of |
21 // the base picture in each tile. | 20 // the base picture in each tile. |
22 const int kBasePictureSize = 512; | 21 const int kBasePictureSize = 512; |
23 const int kTileGridBorderPixels = 1; | 22 const int kTileGridBorderPixels = 1; |
24 #ifdef NDEBUG | 23 #ifdef NDEBUG |
25 const bool kDefaultClearCanvasSetting = false; | 24 const bool kDefaultClearCanvasSetting = false; |
26 #else | 25 #else |
27 const bool kDefaultClearCanvasSetting = true; | 26 const bool kDefaultClearCanvasSetting = true; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 const Picture* PicturePileBase::PictureInfo::GetPicture() const { | 248 const Picture* PicturePileBase::PictureInfo::GetPicture() const { |
250 return picture_.get(); | 249 return picture_.get(); |
251 } | 250 } |
252 | 251 |
253 float PicturePileBase::PictureInfo::GetInvalidationFrequency() const { | 252 float PicturePileBase::PictureInfo::GetInvalidationFrequency() const { |
254 return invalidation_history_.count() / | 253 return invalidation_history_.count() / |
255 static_cast<float>(INVALIDATION_FRAMES_TRACKED); | 254 static_cast<float>(INVALIDATION_FRAMES_TRACKED); |
256 } | 255 } |
257 | 256 |
258 } // namespace cc | 257 } // namespace cc |
OLD | NEW |