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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 478703002: Remove cc::LayerTreeHostImpl::IsContextLost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ctx4
Patch Set: Include all changes. Prev patchset was second stage only 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/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 2845d1897950097b67ee075b27d4daa630a24923..3922790c3f8c229b3b1cf87c4fcd8ef7b38ddd3f 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1102,6 +1102,9 @@ DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) {
"SourceFrameNumber",
active_tree_->source_frame_number());
+ if (!have_valid_output_surface_)
danakj 2014/08/15 17:45:15 For this to happen, we'd have to get the callback
dneto 2014/08/15 17:58:20 In a first attempt, I made LTHI::CanDraw return fa
danakj 2014/08/15 18:00:12 Ya, make DoComposite return void. I'm suggesting t
+ return DRAW_ABORTED_CONTEXT_LOST;
+
if (need_to_update_visible_tiles_before_draw_ &&
tile_manager_ && tile_manager_->UpdateVisibleTiles()) {
DidInitializeVisibleTile();
@@ -1616,13 +1619,6 @@ void LayerTreeHostImpl::FinishAllRendering() {
renderer_->Finish();
}
-bool LayerTreeHostImpl::IsContextLost() {
- DCHECK(proxy_->IsImplThread());
- // To avoid races, rely only on the lost-surface callback.
- // See crbug.com/392891.
- return !have_valid_output_surface_;
-}
-
void LayerTreeHostImpl::SetUseGpuRasterization(bool use_gpu) {
if (use_gpu == use_gpu_rasterization_)
return;
@@ -3297,7 +3293,7 @@ void LayerTreeHostImpl::CreateUIResource(UIResourceId uid,
case UIResourceBitmap::ETC1:
format = ETC1;
break;
- };
+ }
dneto 2014/08/15 17:44:31 This fixes a readability issue reported when I fir
id = resource_provider_->CreateResource(
bitmap.GetSize(),
wrap_mode,

Powered by Google App Engine
This is Rietveld 408576698