OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/display_item_list.h" | 5 #include "cc/playback/display_item_list.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 float raster_scale, | 302 float raster_scale, |
303 std::vector<DrawImage>* images) { | 303 std::vector<DrawImage>* images) { |
304 image_map_.GetDiscardableImagesInRect(rect, raster_scale, images); | 304 image_map_.GetDiscardableImagesInRect(rect, raster_scale, images); |
305 } | 305 } |
306 | 306 |
307 bool DisplayItemList::HasDiscardableImageInRect( | 307 bool DisplayItemList::HasDiscardableImageInRect( |
308 const gfx::Rect& layer_rect) const { | 308 const gfx::Rect& layer_rect) const { |
309 return image_map_.HasDiscardableImageInRect(layer_rect); | 309 return image_map_.HasDiscardableImageInRect(layer_rect); |
310 } | 310 } |
311 | 311 |
| 312 bool DisplayItemList::MayHaveDiscardableImages() const { |
| 313 return !image_map_.empty(); |
| 314 } |
| 315 |
312 } // namespace cc | 316 } // namespace cc |
OLD | NEW |