| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 DiscardableImageMap* image_map, | 287 DiscardableImageMap* image_map, |
| 288 const gfx::Size& bounds) | 288 const gfx::Size& bounds) |
| 289 : image_map_(image_map), | 289 : image_map_(image_map), |
| 290 metadata_canvas_(image_map->BeginGeneratingMetadata(bounds)) {} | 290 metadata_canvas_(image_map->BeginGeneratingMetadata(bounds)) {} |
| 291 | 291 |
| 292 DiscardableImageMap::ScopedMetadataGenerator::~ScopedMetadataGenerator() { | 292 DiscardableImageMap::ScopedMetadataGenerator::~ScopedMetadataGenerator() { |
| 293 image_map_->EndGeneratingMetadata(); | 293 image_map_->EndGeneratingMetadata(); |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace cc | 296 } // namespace cc |
| OLD | NEW |