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

Unified Diff: mojo/services/html_viewer/weblayertreeview_impl.cc

Issue 869343004: Remove use of mojo.SurfacesService interface in html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « mojo/services/html_viewer/weblayertreeview_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/weblayertreeview_impl.cc
diff --git a/mojo/services/html_viewer/weblayertreeview_impl.cc b/mojo/services/html_viewer/weblayertreeview_impl.cc
index 237e7dca772337db557fd7c36781629992ec4e33..77c74ecca20a3405d585bcbb8361cd034ae7e743 100644
--- a/mojo/services/html_viewer/weblayertreeview_impl.cc
+++ b/mojo/services/html_viewer/weblayertreeview_impl.cc
@@ -20,18 +20,13 @@ namespace html_viewer {
WebLayerTreeViewImpl::WebLayerTreeViewImpl(
scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy,
- mojo::SurfacesServicePtr surfaces_service,
+ mojo::SurfacePtr surface,
mojo::GpuPtr gpu_service)
: widget_(NULL),
view_(NULL),
- surfaces_service_(surfaces_service.Pass()),
- gpu_service_(gpu_service.Pass()),
main_thread_compositor_task_runner_(base::MessageLoopProxy::current()),
weak_factory_(this) {
main_thread_bound_weak_ptr_ = weak_factory_.GetWeakPtr();
- surfaces_service_->CreateSurfaceConnection(
- base::Bind(&WebLayerTreeViewImpl::OnSurfaceConnectionCreated,
- main_thread_bound_weak_ptr_));
cc::LayerTreeSettings settings;
@@ -51,6 +46,14 @@ WebLayerTreeViewImpl::WebLayerTreeViewImpl(
compositor_message_loop_proxy,
nullptr);
DCHECK(layer_tree_host_);
+
+ mojo::CommandBufferPtr cb;
+ gpu_service->CreateOffscreenGLES2Context(GetProxy(&cb));
+ scoped_refptr<cc::ContextProvider> context_provider(
+ new mojo::ContextProviderMojo(cb.PassMessagePipe()));
+ output_surface_.reset(
+ new mojo::OutputSurfaceMojo(this, context_provider, surface.Pass()));
+ layer_tree_host_->SetLayerTreeHostClientReady();
}
WebLayerTreeViewImpl::~WebLayerTreeViewImpl() {
@@ -228,17 +231,6 @@ void WebLayerTreeViewImpl::finishAllRendering() {
layer_tree_host_->FinishAllRendering();
}
-void WebLayerTreeViewImpl::OnSurfaceConnectionCreated(mojo::SurfacePtr surface,
- uint32_t id_namespace) {
- mojo::CommandBufferPtr cb;
- gpu_service_->CreateOffscreenGLES2Context(GetProxy(&cb));
- scoped_refptr<cc::ContextProvider> context_provider(
- new mojo::ContextProviderMojo(cb.PassMessagePipe()));
- output_surface_.reset(new mojo::OutputSurfaceMojo(
- this, context_provider, surface.Pass(), id_namespace));
- layer_tree_host_->SetLayerTreeHostClientReady();
-}
-
void WebLayerTreeViewImpl::DidCreateSurface(cc::SurfaceId id) {
main_thread_compositor_task_runner_->PostTask(
FROM_HERE,
« no previous file with comments | « mojo/services/html_viewer/weblayertreeview_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698