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 21 matching lines...) Expand all Loading... |
32 case cc::ContentLayerClient::DISPLAY_LIST_PAINTING_DISABLED: | 32 case cc::ContentLayerClient::DISPLAY_LIST_PAINTING_DISABLED: |
33 return blink::WebContentLayerClient::DisplayListPaintingDisabled; | 33 return blink::WebContentLayerClient::DisplayListPaintingDisabled; |
34 } | 34 } |
35 NOTREACHED(); | 35 NOTREACHED(); |
36 return blink::WebContentLayerClient::PaintDefaultBehavior; | 36 return blink::WebContentLayerClient::PaintDefaultBehavior; |
37 } | 37 } |
38 | 38 |
39 WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client) | 39 WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client) |
40 : client_(client) { | 40 : client_(client) { |
41 if (WebLayerImpl::UsingPictureLayer()) | 41 if (WebLayerImpl::UsingPictureLayer()) |
42 layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this))); | 42 layer_ = make_scoped_ptr(new WebLayerImpl( |
| 43 PictureLayer::Create(WebLayerImpl::LayerSettings(), this))); |
43 else | 44 else |
44 layer_ = make_scoped_ptr(new WebLayerImpl(ContentLayer::Create(this))); | 45 layer_ = make_scoped_ptr(new WebLayerImpl( |
| 46 ContentLayer::Create(WebLayerImpl::LayerSettings(), this))); |
45 layer_->layer()->SetIsDrawable(true); | 47 layer_->layer()->SetIsDrawable(true); |
46 } | 48 } |
47 | 49 |
48 WebContentLayerImpl::~WebContentLayerImpl() { | 50 WebContentLayerImpl::~WebContentLayerImpl() { |
49 if (WebLayerImpl::UsingPictureLayer()) | 51 if (WebLayerImpl::UsingPictureLayer()) |
50 static_cast<PictureLayer*>(layer_->layer())->ClearClient(); | 52 static_cast<PictureLayer*>(layer_->layer())->ClearClient(); |
51 else | 53 else |
52 static_cast<ContentLayer*>(layer_->layer())->ClearClient(); | 54 static_cast<ContentLayer*>(layer_->layer())->ClearClient(); |
53 } | 55 } |
54 | 56 |
(...skipping 28 matching lines...) Expand all Loading... |
83 | 85 |
84 WebDisplayItemListImpl list(display_list); | 86 WebDisplayItemListImpl list(display_list); |
85 client_->paintContents(&list, clip, PaintingControlToWeb(painting_control)); | 87 client_->paintContents(&list, clip, PaintingControlToWeb(painting_control)); |
86 } | 88 } |
87 | 89 |
88 bool WebContentLayerImpl::FillsBoundsCompletely() const { | 90 bool WebContentLayerImpl::FillsBoundsCompletely() const { |
89 return false; | 91 return false; |
90 } | 92 } |
91 | 93 |
92 } // namespace cc_blink | 94 } // namespace cc_blink |
OLD | NEW |