summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authordavemoore <davemoore@chromium.org>2015-02-06 17:58:07 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-07 01:58:37 +0000
commit0b46750604491453c46480ab985fec398f97c86e (patch)
tree2e7d85b1d4e98538f7c81de03062f66e4960ce59 /mojo
parent713cf795fb7fec72f546b5e83d20f3fc5df02ae6 (diff)
downloadchromium_src-0b46750604491453c46480ab985fec398f97c86e.zip
chromium_src-0b46750604491453c46480ab985fec398f97c86e.tar.gz
chromium_src-0b46750604491453c46480ab985fec398f97c86e.tar.bz2
Only set a valid surface from html_viewer
We have users of html_viewer that do not use the mojo provided services, including the surface service. This change: https://codereview.chromium.org/869343004/ broke them I think it's right to check this here. Another option would be to do it in layer_tree_host.cc BUG= Review URL: https://codereview.chromium.org/902293002 Cr-Commit-Position: refs/heads/master@{#315157}
Diffstat (limited to 'mojo')
-rw-r--r--mojo/services/html_viewer/weblayertreeview_impl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/mojo/services/html_viewer/weblayertreeview_impl.cc b/mojo/services/html_viewer/weblayertreeview_impl.cc
index 00507dee..a1d4da8 100644
--- a/mojo/services/html_viewer/weblayertreeview_impl.cc
+++ b/mojo/services/html_viewer/weblayertreeview_impl.cc
@@ -101,7 +101,8 @@ void WebLayerTreeViewImpl::ApplyViewportDeltas(
}
void WebLayerTreeViewImpl::RequestNewOutputSurface() {
- layer_tree_host_->SetOutputSurface(output_surface_.Pass());
+ if (output_surface_.get())
+ layer_tree_host_->SetOutputSurface(output_surface_.Pass());
}
void WebLayerTreeViewImpl::DidFailToInitializeOutputSurface() {