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

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

Issue 2559413002: [1/5] Pass transformed rasterization policy from Blink (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « cc/blink/web_content_layer_impl.h ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 WebContentLayerImpl::~WebContentLayerImpl() { 54 WebContentLayerImpl::~WebContentLayerImpl() {
55 static_cast<PictureLayer*>(layer_->layer())->ClearClient(); 55 static_cast<PictureLayer*>(layer_->layer())->ClearClient();
56 } 56 }
57 57
58 blink::WebLayer* WebContentLayerImpl::layer() { 58 blink::WebLayer* WebContentLayerImpl::layer() {
59 return layer_.get(); 59 return layer_.get();
60 } 60 }
61 61
62 void WebContentLayerImpl::setAllowTransformedRasterization(bool allowed) {
63 static_cast<PictureLayer*>(layer_->layer())
64 ->SetAllowTransformedRasterization(allowed);
65 }
66
62 gfx::Rect WebContentLayerImpl::PaintableRegion() { 67 gfx::Rect WebContentLayerImpl::PaintableRegion() {
63 return client_->paintableRegion(); 68 return client_->paintableRegion();
64 } 69 }
65 70
66 scoped_refptr<cc::DisplayItemList> 71 scoped_refptr<cc::DisplayItemList>
67 WebContentLayerImpl::PaintContentsToDisplayList( 72 WebContentLayerImpl::PaintContentsToDisplayList(
68 cc::ContentLayerClient::PaintingControlSetting painting_control) { 73 cc::ContentLayerClient::PaintingControlSetting painting_control) {
69 auto display_list = make_scoped_refptr(new cc::DisplayItemList); 74 auto display_list = make_scoped_refptr(new cc::DisplayItemList);
70 if (client_) { 75 if (client_) {
71 WebDisplayItemListImpl list(display_list.get()); 76 WebDisplayItemListImpl list(display_list.get());
72 client_->paintContents(&list, PaintingControlToWeb(painting_control)); 77 client_->paintContents(&list, PaintingControlToWeb(painting_control));
73 } 78 }
74 display_list->Finalize(); 79 display_list->Finalize();
75 return display_list; 80 return display_list;
76 } 81 }
77 82
78 bool WebContentLayerImpl::FillsBoundsCompletely() const { 83 bool WebContentLayerImpl::FillsBoundsCompletely() const {
79 return false; 84 return false;
80 } 85 }
81 86
82 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const { 87 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const {
83 return client_->approximateUnsharedMemoryUsage(); 88 return client_->approximateUnsharedMemoryUsage();
84 } 89 }
85 90
86 } // namespace cc_blink 91 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_content_layer_impl.h ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698