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

Unified Diff: examples/surfaces_app/child_gl_impl.h

Issue 807733002: Split surface id and simplify connecting to surfaces service (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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: examples/surfaces_app/child_gl_impl.h
diff --git a/examples/surfaces_app/child_gl_impl.h b/examples/surfaces_app/child_gl_impl.h
index c84e56410e1bc535c36d0e23affe52629dba067e..ac241aa06977611145ed6588c54febb76e0c716c 100644
--- a/examples/surfaces_app/child_gl_impl.h
+++ b/examples/surfaces_app/child_gl_impl.h
@@ -18,7 +18,6 @@
#include "mojo/public/cpp/bindings/string.h"
#include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h"
#include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h"
-#include "mojo/services/surfaces/public/interfaces/surfaces_service.mojom.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/size.h"
@@ -37,31 +36,29 @@ class ChildGLImpl : public InterfaceImpl<Child>, public SurfaceClient {
public:
ChildGLImpl(ApplicationConnection* surfaces_service_connection,
CommandBufferPtr command_buffer);
- virtual ~ChildGLImpl();
+ ~ChildGLImpl() override;
// SurfaceClient implementation
- virtual void ReturnResources(Array<ReturnedResourcePtr> resources) override;
+ void SetIdNamespace(uint32_t id_namespace) override;
+ void ReturnResources(Array<ReturnedResourcePtr> resources) override;
private:
// Child implementation.
- virtual void ProduceFrame(
+ void ProduceFrame(
ColorPtr color,
SizePtr size,
const mojo::Callback<void(SurfaceIdPtr id)>& callback) override;
- void SurfaceConnectionCreated(SurfacePtr surface, uint32_t id_namespace);
void AllocateSurface();
void Draw();
SkColor color_;
gfx::Size size_;
scoped_ptr<cc::SurfaceIdAllocator> allocator_;
- SurfacesServicePtr surfaces_service_;
SurfacePtr surface_;
MojoGLES2Context context_;
cc::SurfaceId id_;
::examples::SpinningCube cube_;
- Callback<void(SurfaceIdPtr id)> produce_callback_;
base::TimeTicks start_time_;
uint32_t next_resource_id_;
base::hash_map<uint32_t, GLuint> id_to_tex_map_;

Powered by Google App Engine
This is Rietveld 408576698