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

Unified Diff: mojo/cc/output_surface_mojo.cc

Issue 558343004: Compositor bindings for mojo html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_view_manager_surface
Patch Set: Add missing m/s/p/cpp/v_m -> m/s/p/cpp/surfaces dep in GN Created 6 years, 3 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/cc/output_surface_mojo.h ('k') | mojo/mojo_services.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/cc/output_surface_mojo.cc
diff --git a/mojo/cc/output_surface_mojo.cc b/mojo/cc/output_surface_mojo.cc
index 05c6a84a922cbf610c00e149017c18ffbcf241d7..37a4eb0aada833cb0c22775dc1464ce1aa54626a 100644
--- a/mojo/cc/output_surface_mojo.cc
+++ b/mojo/cc/output_surface_mojo.cc
@@ -12,13 +12,17 @@
namespace mojo {
OutputSurfaceMojo::OutputSurfaceMojo(
+ OutputSurfaceMojoClient* client,
const scoped_refptr<cc::ContextProvider>& context_provider,
SurfacePtr surface,
uint32_t id_namespace)
: cc::OutputSurface(context_provider),
+ output_surface_mojo_client_(client),
surface_(surface.Pass()),
id_allocator_(id_namespace) {
surface_.set_client(this);
+ capabilities_.delegated_rendering = true;
+ capabilities_.max_frames_pending = 1;
}
OutputSurfaceMojo::~OutputSurfaceMojo() {
@@ -37,6 +41,7 @@ void OutputSurfaceMojo::SwapBuffers(cc::CompositorFrame* frame) {
surface_id_ = id_allocator_.GenerateId();
surface_->CreateSurface(SurfaceId::From(surface_id_),
Size::From(frame_size));
+ output_surface_mojo_client_->DidCreateSurface(surface_id_);
surface_size_ = frame_size;
}
« no previous file with comments | « mojo/cc/output_surface_mojo.h ('k') | mojo/mojo_services.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698