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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 859033003: Check output_surface_ is not null before calling ForceReclaimResources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 active_tree_->ResetContentsTexturesPurged(); 289 active_tree_->ResetContentsTexturesPurged();
290 } 290 }
291 } 291 }
292 292
293 void LayerTreeHostImpl::BeginCommit() { 293 void LayerTreeHostImpl::BeginCommit() {
294 TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit"); 294 TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit");
295 295
296 // Ensure all textures are returned so partial texture updates can happen 296 // Ensure all textures are returned so partial texture updates can happen
297 // during the commit. Impl-side-painting doesn't upload during commits, so 297 // during the commit. Impl-side-painting doesn't upload during commits, so
298 // is unaffected. 298 // is unaffected.
299 if (!settings_.impl_side_painting) 299 if (!settings_.impl_side_painting && output_surface_)
300 output_surface_->ForceReclaimResources(); 300 output_surface_->ForceReclaimResources();
301 301
302 if (UsePendingTreeForSync()) 302 if (UsePendingTreeForSync())
303 CreatePendingTree(); 303 CreatePendingTree();
304 } 304 }
305 305
306 void LayerTreeHostImpl::CommitComplete() { 306 void LayerTreeHostImpl::CommitComplete() {
307 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); 307 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete");
308 308
309 if (pending_tree_) 309 if (pending_tree_)
(...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3507 } 3507 }
3508 3508
3509 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3509 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3510 std::vector<PictureLayerImpl*>::iterator it = 3510 std::vector<PictureLayerImpl*>::iterator it =
3511 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3511 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3512 DCHECK(it != picture_layers_.end()); 3512 DCHECK(it != picture_layers_.end());
3513 picture_layers_.erase(it); 3513 picture_layers_.erase(it);
3514 } 3514 }
3515 3515
3516 } // namespace cc 3516 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698