| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/playback/discardable_image_map.h" | 5 #include "cc/playback/discardable_image_map.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <algorithm> | 9 #include <algorithm> |
| 8 #include <limits> | 10 #include <limits> |
| 9 | 11 |
| 10 #include "cc/base/math_util.h" | 12 #include "cc/base/math_util.h" |
| 11 #include "cc/playback/display_item_list.h" | 13 #include "cc/playback/display_item_list.h" |
| 12 #include "third_party/skia/include/utils/SkNWayCanvas.h" | 14 #include "third_party/skia/include/utils/SkNWayCanvas.h" |
| 13 #include "ui/gfx/geometry/rect_conversions.h" | 15 #include "ui/gfx/geometry/rect_conversions.h" |
| 14 #include "ui/gfx/skia_util.h" | 16 #include "ui/gfx/skia_util.h" |
| 15 | 17 |
| 16 namespace cc { | 18 namespace cc { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 DiscardableImageMap* image_map, | 143 DiscardableImageMap* image_map, |
| 142 const gfx::Size& bounds) | 144 const gfx::Size& bounds) |
| 143 : image_map_(image_map), | 145 : image_map_(image_map), |
| 144 metadata_canvas_(image_map->BeginGeneratingMetadata(bounds)) {} | 146 metadata_canvas_(image_map->BeginGeneratingMetadata(bounds)) {} |
| 145 | 147 |
| 146 DiscardableImageMap::ScopedMetadataGenerator::~ScopedMetadataGenerator() { | 148 DiscardableImageMap::ScopedMetadataGenerator::~ScopedMetadataGenerator() { |
| 147 image_map_->EndGeneratingMetadata(); | 149 image_map_->EndGeneratingMetadata(); |
| 148 } | 150 } |
| 149 | 151 |
| 150 } // namespace cc | 152 } // namespace cc |
| OLD | NEW |