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

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

Issue 99553002: cc: Prevent ResourceUpdateContoller from uploading textures after lost context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « cc/trees/layer_tree_host_unittest_context.cc ('k') | 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/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 if (!ShouldComposite() || (for_readback && !can_do_readback)) { 513 if (!ShouldComposite() || (for_readback && !can_do_readback)) {
514 UpdateBackgroundAnimateTicking(); 514 UpdateBackgroundAnimateTicking();
515 return false; 515 return false;
516 } 516 }
517 517
518 layer_tree_host_impl_->Animate( 518 layer_tree_host_impl_->Animate(
519 layer_tree_host_impl_->CurrentFrameTimeTicks(), 519 layer_tree_host_impl_->CurrentFrameTimeTicks(),
520 layer_tree_host_impl_->CurrentFrameTime()); 520 layer_tree_host_impl_->CurrentFrameTime());
521 UpdateBackgroundAnimateTicking(); 521 UpdateBackgroundAnimateTicking();
522 522
523 layer_tree_host_impl_->PrepareToDraw(frame, device_viewport_damage_rect); 523 if (!layer_tree_host_impl_->IsContextLost()) {
524 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time); 524 layer_tree_host_impl_->PrepareToDraw(frame, device_viewport_damage_rect);
525 layer_tree_host_impl_->DidDrawAllLayers(*frame); 525 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time);
526 layer_tree_host_impl_->DidDrawAllLayers(*frame);
527 }
526 lost_output_surface = layer_tree_host_impl_->IsContextLost(); 528 lost_output_surface = layer_tree_host_impl_->IsContextLost();
527 529
528 bool start_ready_animations = true; 530 bool start_ready_animations = true;
529 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); 531 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations);
530 532
531 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); 533 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame();
532 } 534 }
533 535
534 if (lost_output_surface) { 536 if (lost_output_surface) {
535 cc::ContextProvider* offscreen_contexts = 537 cc::ContextProvider* offscreen_contexts =
(...skipping 10 matching lines...) Expand all
546 void SingleThreadProxy::DidSwapFrame() { 548 void SingleThreadProxy::DidSwapFrame() {
547 if (next_frame_is_newly_committed_frame_) { 549 if (next_frame_is_newly_committed_frame_) {
548 next_frame_is_newly_committed_frame_ = false; 550 next_frame_is_newly_committed_frame_ = false;
549 layer_tree_host_->DidCommitAndDrawFrame(); 551 layer_tree_host_->DidCommitAndDrawFrame();
550 } 552 }
551 } 553 }
552 554
553 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 555 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
554 556
555 } // namespace cc 557 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698