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, |