| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 void WebDisplayItemListImpl::appendClipItem( | 62 void WebDisplayItemListImpl::appendClipItem( |
| 63 const blink::WebRect& visual_rect, | 63 const blink::WebRect& visual_rect, |
| 64 const blink::WebRect& clip_rect, | 64 const blink::WebRect& clip_rect, |
| 65 const blink::WebVector<SkRRect>& rounded_clip_rects) { | 65 const blink::WebVector<SkRRect>& rounded_clip_rects) { |
| 66 std::vector<SkRRect> rounded_rects; | 66 std::vector<SkRRect> rounded_rects; |
| 67 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) { | 67 for (size_t i = 0; i < rounded_clip_rects.size(); ++i) { |
| 68 rounded_rects.push_back(rounded_clip_rects[i]); | 68 rounded_rects.push_back(rounded_clip_rects[i]); |
| 69 } | 69 } |
| 70 bool antialias = true; |
| 70 if (display_item_list_->RetainsIndividualDisplayItems()) { | 71 if (display_item_list_->RetainsIndividualDisplayItems()) { |
| 71 display_item_list_->CreateAndAppendItem<cc::ClipDisplayItem>( | 72 display_item_list_->CreateAndAppendItem<cc::ClipDisplayItem>( |
| 72 visual_rect, clip_rect, rounded_rects); | 73 visual_rect, clip_rect, rounded_rects, antialias); |
| 73 } else { | 74 } else { |
| 74 cc::ClipDisplayItem item(clip_rect, rounded_rects); | 75 cc::ClipDisplayItem item(clip_rect, rounded_rects, antialias); |
| 75 display_item_list_->RasterIntoCanvas(item); | 76 display_item_list_->RasterIntoCanvas(item); |
| 76 } | 77 } |
| 77 } | 78 } |
| 78 | 79 |
| 79 void WebDisplayItemListImpl::appendEndClipItem( | 80 void WebDisplayItemListImpl::appendEndClipItem( |
| 80 const blink::WebRect& visual_rect) { | 81 const blink::WebRect& visual_rect) { |
| 81 if (display_item_list_->RetainsIndividualDisplayItems()) { | 82 if (display_item_list_->RetainsIndividualDisplayItems()) { |
| 82 display_item_list_->CreateAndAppendItem<cc::EndClipDisplayItem>( | 83 display_item_list_->CreateAndAppendItem<cc::EndClipDisplayItem>( |
| 83 visual_rect); | 84 visual_rect); |
| 84 } else { | 85 } else { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 231 } |
| 231 | 232 |
| 232 void WebDisplayItemListImpl::setIsSuitableForGpuRasterization(bool isSuitable) { | 233 void WebDisplayItemListImpl::setIsSuitableForGpuRasterization(bool isSuitable) { |
| 233 display_item_list_->SetIsSuitableForGpuRasterization(isSuitable); | 234 display_item_list_->SetIsSuitableForGpuRasterization(isSuitable); |
| 234 } | 235 } |
| 235 | 236 |
| 236 WebDisplayItemListImpl::~WebDisplayItemListImpl() { | 237 WebDisplayItemListImpl::~WebDisplayItemListImpl() { |
| 237 } | 238 } |
| 238 | 239 |
| 239 } // namespace cc_blink | 240 } // namespace cc_blink |
| OLD | NEW |