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

Side by Side Diff: cc/layers/picture_layer.cc

Issue 389973005: Merge 280970 "Add switch to disable recording whole document" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | cc/trees/layer_tree_settings.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 #include "third_party/skia/include/core/SkPictureRecorder.h" 10 #include "third_party/skia/include/core/SkPictureRecorder.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 devtools_instrumentation::ScopedLayerTreeTask update_layer( 109 devtools_instrumentation::ScopedLayerTreeTask update_layer(
110 devtools_instrumentation::kUpdateLayer, id(), layer_tree_host()->id()); 110 devtools_instrumentation::kUpdateLayer, id(), layer_tree_host()->id());
111 111
112 pile_->SetTilingRect(layer_rect); 112 pile_->SetTilingRect(layer_rect);
113 113
114 // Calling paint in WebKit can sometimes cause invalidations, so save 114 // Calling paint in WebKit can sometimes cause invalidations, so save
115 // off the invalidation prior to calling update. 115 // off the invalidation prior to calling update.
116 pending_invalidation_.Swap(&pile_invalidation_); 116 pending_invalidation_.Swap(&pile_invalidation_);
117 pending_invalidation_.Clear(); 117 pending_invalidation_.Clear();
118 118
119 if (layer_tree_host()->settings().using_synchronous_renderer_compositor) { 119 if (layer_tree_host()->settings().record_full_layer) {
120 // Workaround for http://crbug.com/235910 - to retain backwards compat 120 // Workaround for http://crbug.com/235910 - to retain backwards compat
121 // the full page content must always be provided in the picture layer. 121 // the full page content must always be provided in the picture layer.
122 visible_layer_rect = gfx::Rect(bounds()); 122 visible_layer_rect = gfx::Rect(bounds());
123 } 123 }
124 124
125 // UpdateAndExpandInvalidation will give us an invalidation that covers 125 // UpdateAndExpandInvalidation will give us an invalidation that covers
126 // anything not explicitly recorded in this frame. We give this region 126 // anything not explicitly recorded in this frame. We give this region
127 // to the impl side so that it drops tiles that may not have a recording 127 // to the impl side so that it drops tiles that may not have a recording
128 // for them. 128 // for them.
129 DCHECK(client_); 129 DCHECK(client_);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 bool PictureLayer::IsSuitableForGpuRasterization() const { 202 bool PictureLayer::IsSuitableForGpuRasterization() const {
203 return pile_->is_suitable_for_gpu_rasterization(); 203 return pile_->is_suitable_for_gpu_rasterization();
204 } 204 }
205 205
206 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 206 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
207 benchmark->RunOnLayer(this); 207 benchmark->RunOnLayer(this);
208 } 208 }
209 209
210 } // namespace cc 210 } // namespace cc
OLDNEW
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698