OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/image_hijack_canvas.h" | 5 #include "cc/raster/image_hijack_canvas.h" |
6 | 6 |
7 #include "base/optional.h" | 7 #include "base/optional.h" |
8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "cc/playback/discardable_image_map.h" | 9 #include "cc/paint/discardable_image_map.h" |
10 #include "cc/tiles/image_decode_cache.h" | 10 #include "cc/tiles/image_decode_cache.h" |
11 #include "third_party/skia/include/core/SkPath.h" | 11 #include "third_party/skia/include/core/SkPath.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 namespace { | 14 namespace { |
15 | 15 |
16 SkIRect RoundOutRect(const SkRect& rect) { | 16 SkIRect RoundOutRect(const SkRect& rect) { |
17 SkIRect result; | 17 SkIRect result; |
18 rect.roundOut(&result); | 18 rect.roundOut(&result); |
19 return result; | 19 return result; |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 image->uniqueID(), "skip", skip); | 327 image->uniqueID(), "skip", skip); |
328 return skip; | 328 return skip; |
329 } | 329 } |
330 | 330 |
331 bool ImageHijackCanvas::ShouldSkipImageInPaint(const SkPaint& paint) const { | 331 bool ImageHijackCanvas::ShouldSkipImageInPaint(const SkPaint& paint) const { |
332 const SkImage* image = GetImageInPaint(paint); | 332 const SkImage* image = GetImageInPaint(paint); |
333 return image ? ShouldSkipImage(image) : false; | 333 return image ? ShouldSkipImage(image) : false; |
334 } | 334 } |
335 | 335 |
336 } // namespace cc | 336 } // namespace cc |
OLD | NEW |