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

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

Issue 347493002: Revert 277964 "cc: In SyncFromActiveLayer, drop all tiles not in..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | « trunk/src/cc/base/tiling_data_unittest.cc ('k') | trunk/src/cc/layers/picture_layer_impl.cc » ('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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
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().using_synchronous_renderer_compositor) {
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
125 // UpdateAndExpandInvalidation will give us an invalidation that covers
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
128 // for them.
129 DCHECK(client_); 124 DCHECK(client_);
130 updated |= 125 updated |= pile_->Update(client_,
131 pile_->UpdateAndExpandInvalidation(client_, 126 SafeOpaqueBackgroundColor(),
132 &pile_invalidation_, 127 contents_opaque(),
133 SafeOpaqueBackgroundColor(), 128 client_->FillsBoundsCompletely(),
134 contents_opaque(), 129 pile_invalidation_,
135 client_->FillsBoundsCompletely(), 130 visible_layer_rect,
136 visible_layer_rect, 131 update_source_frame_number_,
137 update_source_frame_number_, 132 RecordingMode(),
138 RecordingMode(), 133 rendering_stats_instrumentation());
139 rendering_stats_instrumentation());
140 last_updated_visible_content_rect_ = visible_content_rect(); 134 last_updated_visible_content_rect_ = visible_content_rect();
141 135
142 if (updated) { 136 if (updated) {
143 SetNeedsPushProperties(); 137 SetNeedsPushProperties();
144 } else { 138 } else {
145 // If this invalidation did not affect the pile, then it can be cleared as 139 // If this invalidation did not affect the pile, then it can be cleared as
146 // an optimization. 140 // an optimization.
147 pile_invalidation_.Clear(); 141 pile_invalidation_.Clear();
148 } 142 }
149 143
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 195
202 bool PictureLayer::IsSuitableForGpuRasterization() const { 196 bool PictureLayer::IsSuitableForGpuRasterization() const {
203 return pile_->is_suitable_for_gpu_rasterization(); 197 return pile_->is_suitable_for_gpu_rasterization();
204 } 198 }
205 199
206 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 200 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
207 benchmark->RunOnLayer(this); 201 benchmark->RunOnLayer(this);
208 } 202 }
209 203
210 } // namespace cc 204 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/base/tiling_data_unittest.cc ('k') | trunk/src/cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698