| 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/blink/web_display_item_list_impl.h" | 5 #include "cc/blink/web_display_item_list_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 WebDisplayItemListImpl::WebDisplayItemListImpl( | 47 WebDisplayItemListImpl::WebDisplayItemListImpl( |
| 48 cc::DisplayItemList* display_list) | 48 cc::DisplayItemList* display_list) |
| 49 : display_item_list_(display_list) { | 49 : display_item_list_(display_list) { |
| 50 } | 50 } |
| 51 | 51 |
| 52 void WebDisplayItemListImpl::appendDrawingItem( | 52 void WebDisplayItemListImpl::appendDrawingItem( |
| 53 const blink::WebRect& visual_rect, | 53 const blink::WebRect& visual_rect, |
| 54 const SkPicture* picture) { | 54 const SkPicture* picture) { |
| 55 if (display_item_list_->RetainsIndividualDisplayItems()) { | 55 if (display_item_list_->RetainsIndividualDisplayItems()) { |
| 56 display_item_list_->CreateAndAppendItem<cc::DrawingDisplayItem>( | 56 display_item_list_->CreateAndAppendItem<cc::DrawingDisplayItem>( |
| 57 visual_rect, skia::SharePtr(const_cast<SkPicture*>(picture))); | 57 visual_rect, skia::SharePtr(picture)); |
| 58 } else { | 58 } else { |
| 59 cc::DrawingDisplayItem item( | 59 cc::DrawingDisplayItem item(skia::SharePtr(picture)); |
| 60 skia::SharePtr(const_cast<SkPicture*>(picture))); | |
| 61 display_item_list_->RasterIntoCanvas(item); | 60 display_item_list_->RasterIntoCanvas(item); |
| 62 } | 61 } |
| 63 } | 62 } |
| 64 | 63 |
| 65 void WebDisplayItemListImpl::appendClipItem( | 64 void WebDisplayItemListImpl::appendClipItem( |
| 66 const blink::WebRect& visual_rect, | 65 const blink::WebRect& visual_rect, |
| 67 const blink::WebRect& clip_rect, | 66 const blink::WebRect& clip_rect, |
| 68 const blink::WebVector<SkRRect>& rounded_clip_rects) { | 67 const blink::WebVector<SkRRect>& rounded_clip_rects) { |
| 69 std::vector<SkRRect> rounded_rects; | 68 std::vector<SkRRect> rounded_rects; |
| 70 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) { | 69 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) { |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 232 |
| 234 void WebDisplayItemListImpl::appendEndScrollItem( | 233 void WebDisplayItemListImpl::appendEndScrollItem( |
| 235 const blink::WebRect& visual_rect) { | 234 const blink::WebRect& visual_rect) { |
| 236 appendEndTransformItem(visual_rect); | 235 appendEndTransformItem(visual_rect); |
| 237 } | 236 } |
| 238 | 237 |
| 239 WebDisplayItemListImpl::~WebDisplayItemListImpl() { | 238 WebDisplayItemListImpl::~WebDisplayItemListImpl() { |
| 240 } | 239 } |
| 241 | 240 |
| 242 } // namespace cc_blink | 241 } // namespace cc_blink |
| OLD | NEW |