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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 picture_->playback(canvas, callback); | 157 picture_->playback(canvas, callback); |
158 } else { | 158 } else { |
159 // Prefer to call |drawPicture()| on the canvas since it could place the | 159 // Prefer to call |drawPicture()| on the canvas since it could place the |
160 // entire picture on the canvas instead of parsing the skia operations. | 160 // entire picture on the canvas instead of parsing the skia operations. |
161 canvas->drawPicture(picture_.get()); | 161 canvas->drawPicture(picture_.get()); |
162 } | 162 } |
163 canvas->restore(); | 163 canvas->restore(); |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
| 167 void DisplayItemList::GrowCurrentBeginItemVisualRect( |
| 168 const gfx::Rect& visual_rect) { |
| 169 if (!inputs_.begin_item_indices.empty()) |
| 170 inputs_.visual_rects[inputs_.begin_item_indices.back()].Union(visual_rect); |
| 171 } |
| 172 |
167 void DisplayItemList::ProcessAppendedItem(const DisplayItem* item) { | 173 void DisplayItemList::ProcessAppendedItem(const DisplayItem* item) { |
168 if (inputs_.settings.use_cached_picture) { | 174 if (inputs_.settings.use_cached_picture) { |
169 DCHECK(recorder_); | 175 DCHECK(recorder_); |
170 item->Raster(recorder_->getRecordingCanvas(), nullptr); | 176 item->Raster(recorder_->getRecordingCanvas(), nullptr); |
171 } | 177 } |
172 if (!retain_individual_display_items_) { | 178 if (!retain_individual_display_items_) { |
173 inputs_.items.Clear(); | 179 inputs_.items.Clear(); |
174 } | 180 } |
175 } | 181 } |
176 | 182 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 } | 330 } |
325 | 331 |
326 void DisplayItemList::GetDiscardableImagesInRect( | 332 void DisplayItemList::GetDiscardableImagesInRect( |
327 const gfx::Rect& rect, | 333 const gfx::Rect& rect, |
328 float raster_scale, | 334 float raster_scale, |
329 std::vector<DrawImage>* images) { | 335 std::vector<DrawImage>* images) { |
330 image_map_.GetDiscardableImagesInRect(rect, raster_scale, images); | 336 image_map_.GetDiscardableImagesInRect(rect, raster_scale, images); |
331 } | 337 } |
332 | 338 |
333 } // namespace cc | 339 } // namespace cc |
OLD | NEW |