| 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/paint/discardable_image_map.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| 11 | 11 |
| 12 #include "base/containers/adapters.h" | 12 #include "base/containers/adapters.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "cc/base/math_util.h" | 14 #include "cc/base/math_util.h" |
| 15 #include "cc/playback/display_item_list.h" | 15 #include "cc/paint/display_item_list.h" |
| 16 #include "third_party/skia/include/core/SkPath.h" | 16 #include "third_party/skia/include/core/SkPath.h" |
| 17 #include "third_party/skia/include/utils/SkNWayCanvas.h" | 17 #include "third_party/skia/include/utils/SkNWayCanvas.h" |
| 18 #include "ui/gfx/geometry/rect_conversions.h" | 18 #include "ui/gfx/geometry/rect_conversions.h" |
| 19 #include "ui/gfx/skia_util.h" | 19 #include "ui/gfx/skia_util.h" |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 | 22 |
| 23 SkRect MapRect(const SkMatrix& matrix, const SkRect& src) { | 23 SkRect MapRect(const SkMatrix& matrix, const SkRect& src) { |
| 24 SkRect dst; | 24 SkRect dst; |
| 25 matrix.mapRect(&dst, src); | 25 matrix.mapRect(&dst, src); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 DiscardableImageMap* image_map, | 274 DiscardableImageMap* image_map, |
| 275 const gfx::Size& bounds) | 275 const gfx::Size& bounds) |
| 276 : image_map_(image_map), | 276 : image_map_(image_map), |
| 277 metadata_canvas_(image_map->BeginGeneratingMetadata(bounds)) {} | 277 metadata_canvas_(image_map->BeginGeneratingMetadata(bounds)) {} |
| 278 | 278 |
| 279 DiscardableImageMap::ScopedMetadataGenerator::~ScopedMetadataGenerator() { | 279 DiscardableImageMap::ScopedMetadataGenerator::~ScopedMetadataGenerator() { |
| 280 image_map_->EndGeneratingMetadata(); | 280 image_map_->EndGeneratingMetadata(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace cc | 283 } // namespace cc |
| OLD | NEW |