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

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

Issue 591473003: (Reland) cc:Use impl-side painting in LTH context lost test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed. Created 6 years, 3 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 | « cc/test/fake_picture_layer_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.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 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 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 ? BeginFrameArgs::DefaultEstimatedParentDrawTime() 2108 ? BeginFrameArgs::DefaultEstimatedParentDrawTime()
2109 : base::TimeDelta(); 2109 : base::TimeDelta();
2110 client_->SetEstimatedParentDrawTime(parent_draw_time); 2110 client_->SetEstimatedParentDrawTime(parent_draw_time);
2111 2111
2112 int max_frames_pending = output_surface_->capabilities().max_frames_pending; 2112 int max_frames_pending = output_surface_->capabilities().max_frames_pending;
2113 if (max_frames_pending <= 0) 2113 if (max_frames_pending <= 0)
2114 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; 2114 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
2115 client_->SetMaxSwapsPendingOnImplThread(max_frames_pending); 2115 client_->SetMaxSwapsPendingOnImplThread(max_frames_pending);
2116 client_->OnCanDrawStateChanged(CanDraw()); 2116 client_->OnCanDrawStateChanged(CanDraw());
2117 2117
2118 // There will not be anything to draw here, so set high res
2119 // to avoid checkerboards, typically when we are recovering
2120 // from lost context.
2121 active_tree_->SetRequiresHighResToDraw();
2122
2118 return true; 2123 return true;
2119 } 2124 }
2120 2125
2121 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase, 2126 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase,
2122 base::TimeDelta interval) { 2127 base::TimeDelta interval) {
2123 client_->CommitVSyncParameters(timebase, interval); 2128 client_->CommitVSyncParameters(timebase, interval);
2124 } 2129 }
2125 2130
2126 void LayerTreeHostImpl::DeferredInitialize() { 2131 void LayerTreeHostImpl::DeferredInitialize() {
2127 DCHECK(output_surface_->capabilities().deferred_gl_initialization); 2132 DCHECK(output_surface_->capabilities().deferred_gl_initialization);
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 } 3383 }
3379 3384
3380 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3385 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3381 std::vector<PictureLayerImpl*>::iterator it = 3386 std::vector<PictureLayerImpl*>::iterator it =
3382 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3387 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3383 DCHECK(it != picture_layers_.end()); 3388 DCHECK(it != picture_layers_.end());
3384 picture_layers_.erase(it); 3389 picture_layers_.erase(it);
3385 } 3390 }
3386 3391
3387 } // namespace cc 3392 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698