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

Unified Diff: components/html_viewer/html_document.cc

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet anther rebase (YAR!!!) Created 5 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: components/html_viewer/html_document.cc
diff --git a/components/html_viewer/html_document.cc b/components/html_viewer/html_document.cc
index ab68283844dfc85414450032314ec9cf70bb8d62..e2177fe9c21ff3526f3fc658bdde28398abc537b 100644
--- a/components/html_viewer/html_document.cc
+++ b/components/html_viewer/html_document.cc
@@ -206,6 +206,8 @@ void HTMLDocument::OnEmbed(View* root) {
DCHECK(!global_state_->is_headless());
root_ = root;
root_->AddObserver(this);
+ root_->RequestCompositorFrameReceiver(
+ compositor_frame_receiver_request_.Pass());
UpdateFocus();
InitGlobalStateAndLoadIfNecessary();
@@ -303,10 +305,8 @@ void HTMLDocument::initializeLayerTreeView() {
return;
}
- mojo::URLRequestPtr request(mojo::URLRequest::New());
- request->url = mojo::String::From("mojo:view_manager");
- mojo::SurfacePtr surface;
- html_document_app_->ConnectToService(request.Pass(), &surface);
+ mojo::CompositorFrameReceiverPtr receiver;
+ compositor_frame_receiver_request_ = GetProxy(&receiver);
// TODO(jamesr): Should be mojo:gpu_service
mojo::URLRequestPtr request2(mojo::URLRequest::New());
@@ -317,7 +317,7 @@ void HTMLDocument::initializeLayerTreeView() {
global_state_->compositor_thread(),
global_state_->gpu_memory_buffer_manager(),
global_state_->raster_thread_helper()->task_graph_runner(),
- surface.Pass(), gpu_service.Pass()));
+ receiver.Pass(), gpu_service.Pass()));
}
blink::WebLayerTreeView* HTMLDocument::layerTreeView() {

Powered by Google App Engine
This is Rietveld 408576698