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

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

Issue 294163009: cc: Expand invalidation to full tile when recording is missing for the tile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pictureslow: doitinpicturepile 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 | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/resources/picture_pile.cc » ('J')
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Calling paint in WebKit can sometimes cause invalidations, so save 112 // Calling paint in WebKit can sometimes cause invalidations, so save
113 // off the invalidation prior to calling update. 113 // off the invalidation prior to calling update.
114 pending_invalidation_.Swap(&pile_invalidation_); 114 pending_invalidation_.Swap(&pile_invalidation_);
115 pending_invalidation_.Clear(); 115 pending_invalidation_.Clear();
116 116
117 if (layer_tree_host()->settings().using_synchronous_renderer_compositor) { 117 if (layer_tree_host()->settings().using_synchronous_renderer_compositor) {
118 // Workaround for http://crbug.com/235910 - to retain backwards compat 118 // Workaround for http://crbug.com/235910 - to retain backwards compat
119 // the full page content must always be provided in the picture layer. 119 // the full page content must always be provided in the picture layer.
120 visible_layer_rect = gfx::Rect(bounds()); 120 visible_layer_rect = gfx::Rect(bounds());
121 } 121 }
122
123 // UpdateAndExpandInvalidation will give us an invalidation that covers
124 // anything not explicitly recorded in this frame. We give this region
125 // to the impl side so that it drops tiles that may not have a recording
126 // for them.
122 DCHECK(client_); 127 DCHECK(client_);
123 updated |= pile_->Update(client_, 128 updated |=
124 SafeOpaqueBackgroundColor(), 129 pile_->UpdateAndExpandInvalidation(client_,
125 contents_opaque(), 130 &pile_invalidation_,
126 client_->FillsBoundsCompletely(), 131 SafeOpaqueBackgroundColor(),
127 pile_invalidation_, 132 contents_opaque(),
128 visible_layer_rect, 133 client_->FillsBoundsCompletely(),
129 update_source_frame_number_, 134 visible_layer_rect,
130 RecordingMode(), 135 update_source_frame_number_,
131 rendering_stats_instrumentation()); 136 RecordingMode(),
137 rendering_stats_instrumentation());
132 last_updated_visible_content_rect_ = visible_content_rect(); 138 last_updated_visible_content_rect_ = visible_content_rect();
133 139
134 if (updated) { 140 if (updated) {
135 SetNeedsPushProperties(); 141 SetNeedsPushProperties();
136 } else { 142 } else {
137 // If this invalidation did not affect the pile, then it can be cleared as 143 // If this invalidation did not affect the pile, then it can be cleared as
138 // an optimization. 144 // an optimization.
139 pile_invalidation_.Clear(); 145 pile_invalidation_.Clear();
140 } 146 }
141 147
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 199
194 bool PictureLayer::IsSuitableForGpuRasterization() const { 200 bool PictureLayer::IsSuitableForGpuRasterization() const {
195 return pile_->is_suitable_for_gpu_rasterization(); 201 return pile_->is_suitable_for_gpu_rasterization();
196 } 202 }
197 203
198 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 204 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
199 benchmark->RunOnLayer(this); 205 benchmark->RunOnLayer(this);
200 } 206 }
201 207
202 } // namespace cc 208 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/resources/picture_pile.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698