Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: cc/blink/web_content_layer_impl.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | cc/blink/web_external_texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698