| 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_content_layer_impl.h" | 5 #include "cc/blink/web_content_layer_impl.h" |
| 6 | 6 |
| 7 #include "cc/blink/web_display_item_list_impl.h" | 7 #include "cc/blink/web_display_item_list_impl.h" |
| 8 #include "cc/layers/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
| 9 #include "cc/layers/picture_layer.h" | 9 #include "cc/layers/picture_layer.h" |
| 10 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" | 10 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 void WebContentLayerImpl::PaintContents( | 65 void WebContentLayerImpl::PaintContents( |
| 66 SkCanvas* canvas, | 66 SkCanvas* canvas, |
| 67 const gfx::Rect& clip, | 67 const gfx::Rect& clip, |
| 68 cc::ContentLayerClient::PaintingControlSetting painting_control) { | 68 cc::ContentLayerClient::PaintingControlSetting painting_control) { |
| 69 if (!client_) | 69 if (!client_) |
| 70 return; | 70 return; |
| 71 | 71 |
| 72 client_->paintContents(canvas, clip, PaintingControlToWeb(painting_control)); | 72 client_->paintContents(canvas, clip, PaintingControlToWeb(painting_control)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 scoped_refptr<cc::DisplayItemList> | 75 void WebContentLayerImpl::PaintContentsToDisplayList( |
| 76 WebContentLayerImpl::PaintContentsToDisplayList( | 76 cc::DisplayItemList* display_list, |
| 77 const gfx::Rect& clip, | 77 const gfx::Rect& clip, |
| 78 cc::ContentLayerClient::PaintingControlSetting painting_control) { | 78 cc::ContentLayerClient::PaintingControlSetting painting_control) { |
| 79 if (!client_) | 79 if (!client_) |
| 80 return cc::DisplayItemList::Create(); | 80 return; |
| 81 | 81 |
| 82 WebDisplayItemListImpl list; | 82 WebDisplayItemListImpl list(display_list); |
| 83 client_->paintContents(&list, clip, PaintingControlToWeb(painting_control)); | 83 client_->paintContents(&list, clip, PaintingControlToWeb(painting_control)); |
| 84 return list.ToDisplayItemList(); | |
| 85 } | 84 } |
| 86 | 85 |
| 87 bool WebContentLayerImpl::FillsBoundsCompletely() const { | 86 bool WebContentLayerImpl::FillsBoundsCompletely() const { |
| 88 return false; | 87 return false; |
| 89 } | 88 } |
| 90 | 89 |
| 91 } // namespace cc_blink | 90 } // namespace cc_blink |
| OLD | NEW |