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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 505713004: Remove cc:LayerTreeHostImpl::IsContextLost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 12898df950658050255fc33a4667f3ac758d72f8..acf481e39df83111c333b788f171d5205ae6dc94 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -509,11 +509,9 @@ DrawResult SingleThreadProxy::DoComposite(base::TimeTicks frame_begin_time,
layer_tree_host_impl_->CurrentBeginFrameArgs().frame_time);
UpdateBackgroundAnimateTicking();
- if (!layer_tree_host_impl_->IsContextLost()) {
- layer_tree_host_impl_->PrepareToDraw(frame);
- layer_tree_host_impl_->DrawLayers(frame, frame_begin_time);
- layer_tree_host_impl_->DidDrawAllLayers(*frame);
- }
+ layer_tree_host_impl_->PrepareToDraw(frame);
+ layer_tree_host_impl_->DrawLayers(frame, frame_begin_time);
+ layer_tree_host_impl_->DidDrawAllLayers(*frame);
bool start_ready_animations = true;
layer_tree_host_impl_->UpdateAnimationState(start_ready_animations);
@@ -526,22 +524,18 @@ DrawResult SingleThreadProxy::DoComposite(base::TimeTicks frame_begin_time,
{
DebugScopedSetImplThread impl(this);
- if (layer_tree_host_impl_->IsContextLost()) {
- DidLoseOutputSurfaceOnImplThread();
- } else {
- // This CapturePostTasks should be destroyed before
- // DidCommitAndDrawFrame() is called since that goes out to the
- // embedder,
- // and we want the embedder to receive its callbacks before that.
- // NOTE: This maintains consistent ordering with the ThreadProxy since
- // the DidCommitAndDrawFrame() must be post-tasked from the impl thread
- // there as the main thread is not blocked, so any posted tasks inside
- // the swap buffers will execute first.
- DebugScopedSetMainThreadBlocked main_thread_blocked(this);
-
- BlockingTaskRunner::CapturePostTasks blocked;
- layer_tree_host_impl_->SwapBuffers(*frame);
- }
+ // This CapturePostTasks should be destroyed before
+ // DidCommitAndDrawFrame() is called since that goes out to the
+ // embedder,
+ // and we want the embedder to receive its callbacks before that.
+ // NOTE: This maintains consistent ordering with the ThreadProxy since
+ // the DidCommitAndDrawFrame() must be post-tasked from the impl thread
+ // there as the main thread is not blocked, so any posted tasks inside
+ // the swap buffers will execute first.
+ DebugScopedSetMainThreadBlocked main_thread_blocked(this);
+
+ BlockingTaskRunner::CapturePostTasks blocked;
+ layer_tree_host_impl_->SwapBuffers(*frame);
}
DidCommitAndDrawFrame();
@@ -628,11 +622,6 @@ void SingleThreadProxy::BeginMainFrameAbortedOnImplThread() {
DrawResult SingleThreadProxy::ScheduledActionDrawAndSwapIfPossible() {
DebugScopedSetImplThread impl(this);
- if (layer_tree_host_impl_->IsContextLost()) {
- DidCommitAndDrawFrame();
- return DRAW_SUCCESS;
- }
-
LayerTreeHostImpl::FrameData frame;
return DoComposite(layer_tree_host_impl_->CurrentBeginFrameArgs().frame_time,
&frame);
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698