| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "cc/base/switches.h" | 8 #include "cc/base/switches.h" |
| 9 #include "cc/blink/web_display_item_list_impl.h" | 9 #include "cc/blink/web_display_item_list_impl.h" |
| 10 #include "cc/layers/picture_layer.h" | 10 #include "cc/layers/picture_layer.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 return client_->paintableRegion(); | 62 return client_->paintableRegion(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 scoped_refptr<cc::DisplayItemList> | 65 scoped_refptr<cc::DisplayItemList> |
| 66 WebContentLayerImpl::PaintContentsToDisplayList( | 66 WebContentLayerImpl::PaintContentsToDisplayList( |
| 67 cc::ContentLayerClient::PaintingControlSetting painting_control) { | 67 cc::ContentLayerClient::PaintingControlSetting painting_control) { |
| 68 cc::DisplayItemListSettings settings; | 68 cc::DisplayItemListSettings settings; |
| 69 settings.use_cached_picture = UseCachedPictureRaster(); | 69 settings.use_cached_picture = UseCachedPictureRaster(); |
| 70 | 70 |
| 71 scoped_refptr<cc::DisplayItemList> display_list = | 71 scoped_refptr<cc::DisplayItemList> display_list = |
| 72 cc::DisplayItemList::Create(PaintableRegion(), settings); | 72 cc::DisplayItemList::Create(settings); |
| 73 if (client_) { | 73 if (client_) { |
| 74 WebDisplayItemListImpl list(display_list.get()); | 74 WebDisplayItemListImpl list(display_list.get()); |
| 75 client_->paintContents(&list, PaintingControlToWeb(painting_control)); | 75 client_->paintContents(&list, PaintingControlToWeb(painting_control)); |
| 76 } | 76 } |
| 77 display_list->Finalize(); | 77 display_list->Finalize(); |
| 78 return display_list; | 78 return display_list; |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool WebContentLayerImpl::FillsBoundsCompletely() const { | 81 bool WebContentLayerImpl::FillsBoundsCompletely() const { |
| 82 return false; | 82 return false; |
| 83 } | 83 } |
| 84 | 84 |
| 85 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const { | 85 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const { |
| 86 return client_->approximateUnsharedMemoryUsage(); | 86 return client_->approximateUnsharedMemoryUsage(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace cc_blink | 89 } // namespace cc_blink |
| OLD | NEW |