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

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

Issue 1452353002: Turn off computation of the interest rect in cc in synchronized paint mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 "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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 WebContentLayerImpl::~WebContentLayerImpl() { 53 WebContentLayerImpl::~WebContentLayerImpl() {
54 static_cast<PictureLayer*>(layer_->layer())->ClearClient(); 54 static_cast<PictureLayer*>(layer_->layer())->ClearClient();
55 } 55 }
56 56
57 blink::WebLayer* WebContentLayerImpl::layer() { 57 blink::WebLayer* WebContentLayerImpl::layer() {
58 return layer_.get(); 58 return layer_.get();
59 } 59 }
60 60
61 scoped_refptr<cc::DisplayItemList> 61 scoped_refptr<cc::DisplayItemList>
62 WebContentLayerImpl::PaintContentsToDisplayList( 62 WebContentLayerImpl::PaintContentsToDisplayList(
63 const gfx::Rect& clip, 63 cc::ContentLayerClient::PaintingControlSetting painting_control,
64 cc::ContentLayerClient::PaintingControlSetting painting_control) { 64 gfx::Rect* recorded_viewport) {
65 cc::DisplayItemListSettings settings; 65 cc::DisplayItemListSettings settings;
66 settings.use_cached_picture = UseCachedPictureRaster(); 66 settings.use_cached_picture = UseCachedPictureRaster();
67 67
68 scoped_refptr<cc::DisplayItemList> display_list = 68 scoped_refptr<cc::DisplayItemList> display_list =
69 cc::DisplayItemList::Create(clip, settings); 69 cc::DisplayItemList::Create(*recorded_viewport, settings);
70 if (client_) { 70 if (client_) {
71 WebDisplayItemListImpl list(display_list.get()); 71 WebDisplayItemListImpl list(display_list.get());
72 client_->paintContents(&list, clip, PaintingControlToWeb(painting_control)); 72 client_->paintContents(&list, recorded_viewport,
73 PaintingControlToWeb(painting_control));
73 } 74 }
74 display_list->Finalize(); 75 display_list->Finalize();
75 return display_list; 76 return display_list;
76 } 77 }
77 78
78 bool WebContentLayerImpl::FillsBoundsCompletely() const { 79 bool WebContentLayerImpl::FillsBoundsCompletely() const {
79 return false; 80 return false;
80 } 81 }
81 82
82 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const { 83 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const {
83 return client_->approximateUnsharedMemoryUsage(); 84 return client_->approximateUnsharedMemoryUsage();
84 } 85 }
85 86
86 } // namespace cc_blink 87 } // namespace cc_blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698