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

Unified Diff: mojo/cc/output_surface_mojo.h

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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
« no previous file with comments | « mojo/cc/DEPS ('k') | mojo/cc/output_surface_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/cc/output_surface_mojo.h
diff --git a/mojo/cc/output_surface_mojo.h b/mojo/cc/output_surface_mojo.h
index 149a7c1dda8a87c23fe353ab46fc7ace5bcf092b..e3b2ddbce631dc798998c0e73610c17c553f7726 100644
--- a/mojo/cc/output_surface_mojo.h
+++ b/mojo/cc/output_surface_mojo.h
@@ -8,45 +8,30 @@
#include "base/macros.h"
#include "cc/output/output_surface.h"
#include "cc/surfaces/surface_id.h"
-#include "components/view_manager/public/interfaces/surfaces.mojom.h"
+#include "components/view_manager/public/cpp/view_surface.h"
+#include "components/view_manager/public/cpp/view_surface_client.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
namespace mojo {
-class OutputSurfaceMojoClient {
- public:
- virtual ~OutputSurfaceMojoClient() {}
-
- virtual void DidCreateSurface(cc::SurfaceId id) = 0;
-};
-
class OutputSurfaceMojo : public cc::OutputSurface,
- public mojo::ResourceReturner {
+ public mojo::ViewSurfaceClient {
public:
- OutputSurfaceMojo(OutputSurfaceMojoClient* client,
- const scoped_refptr<cc::ContextProvider>& context_provider,
- ScopedMessagePipeHandle surface_handle);
-
- // mojo::ResourceReturner implementation.
- void ReturnResources(mojo::Array<ReturnedResourcePtr>) override;
+ OutputSurfaceMojo(const scoped_refptr<cc::ContextProvider>& context_provider,
+ scoped_ptr<mojo::ViewSurface> surface);
+ ~OutputSurfaceMojo() override;
// cc::OutputSurface implementation.
void SwapBuffers(cc::CompositorFrame* frame) override;
bool BindToClient(cc::OutputSurfaceClient* client) override;
- protected:
- ~OutputSurfaceMojo() override;
-
private:
- void SetIdNamespace(uint32_t id_namespace);
-
- OutputSurfaceMojoClient* output_surface_mojo_client_;
- ScopedMessagePipeHandle surface_handle_;
- SurfacePtr surface_;
- uint32_t id_namespace_;
- uint32_t local_id_;
- gfx::Size surface_size_;
- mojo::Binding<mojo::ResourceReturner> binding_;
+ // uip::SurfaceObserver implementation:
+ void OnResourcesReturned(
+ mojo::ViewSurface* surface,
+ mojo::Array<mojo::ReturnedResourcePtr> resources) override;
+
+ scoped_ptr<mojo::ViewSurface> surface_;
DISALLOW_COPY_AND_ASSIGN(OutputSurfaceMojo);
};
« no previous file with comments | « mojo/cc/DEPS ('k') | mojo/cc/output_surface_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698