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

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: Addressed Rob's comments + Lots of cleanup 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..a5034cae21c186dbca4e87a5763ee098dad6c18d 100644
--- a/components/html_viewer/html_document.cc
+++ b/components/html_viewer/html_document.cc
@@ -26,7 +26,6 @@
#include "components/view_manager/public/cpp/view.h"
#include "components/view_manager/public/cpp/view_manager.h"
#include "components/view_manager/public/cpp/view_property.h"
-#include "components/view_manager/public/interfaces/surfaces.mojom.h"
#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/application/public/cpp/connect.h"
#include "mojo/application/public/interfaces/shell.mojom.h"
@@ -206,6 +205,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 +304,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 +316,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