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

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

Issue 475633008: cc: Use impl-side painting in LTH context lost tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove extra add_draw_rect 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 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 ? BeginFrameArgs::DefaultEstimatedParentDrawTime() 2110 ? BeginFrameArgs::DefaultEstimatedParentDrawTime()
2111 : base::TimeDelta(); 2111 : base::TimeDelta();
2112 client_->SetEstimatedParentDrawTime(parent_draw_time); 2112 client_->SetEstimatedParentDrawTime(parent_draw_time);
2113 2113
2114 int max_frames_pending = output_surface_->capabilities().max_frames_pending; 2114 int max_frames_pending = output_surface_->capabilities().max_frames_pending;
2115 if (max_frames_pending <= 0) 2115 if (max_frames_pending <= 0)
2116 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; 2116 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
2117 client_->SetMaxSwapsPendingOnImplThread(max_frames_pending); 2117 client_->SetMaxSwapsPendingOnImplThread(max_frames_pending);
2118 client_->OnCanDrawStateChanged(CanDraw()); 2118 client_->OnCanDrawStateChanged(CanDraw());
2119 2119
2120 // There will not be anything to draw here, so set high res
2121 // to avoid checkerboards, typically when we are recovering
2122 // from lost context.
2123 active_tree_->SetRequiresHighResToDraw();
2124
2120 return true; 2125 return true;
2121 } 2126 }
2122 2127
2123 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase, 2128 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase,
2124 base::TimeDelta interval) { 2129 base::TimeDelta interval) {
2125 client_->CommitVSyncParameters(timebase, interval); 2130 client_->CommitVSyncParameters(timebase, interval);
2126 } 2131 }
2127 2132
2128 void LayerTreeHostImpl::DeferredInitialize() { 2133 void LayerTreeHostImpl::DeferredInitialize() {
2129 DCHECK(output_surface_->capabilities().deferred_gl_initialization); 2134 DCHECK(output_surface_->capabilities().deferred_gl_initialization);
(...skipping 1248 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