Chromium Code Reviews| Index: mojo/cc/output_surface_mojo.h |
| diff --git a/mojo/cc/output_surface_mojo.h b/mojo/cc/output_surface_mojo.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1f1e9f967a22a95a629703006bc3427229ca5d09 |
| --- /dev/null |
| +++ b/mojo/cc/output_surface_mojo.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MOJO_CC_OUTPUT_SURFACE_MOJO_H_ |
| +#define MOJO_CC_OUTPUT_SURFACE_MOJO_H_ |
| + |
| +#include "cc/output/output_surface.h" |
| +#include "cc/surfaces/surface_id.h" |
| +#include "cc/surfaces/surface_id_allocator.h" |
| +#include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h" |
| + |
| +namespace mojo { |
| + |
| +class OutputSurfaceMojo : public cc::OutputSurface, public SurfaceClient { |
| + public: |
| + explicit OutputSurfaceMojo( |
|
sky
2014/08/22 22:20:09
nit: no explicit.
|
| + const scoped_refptr<cc::ContextProvider>& context_provider, |
| + SurfacePtr surface, |
| + uint32_t id_namespace); |
| + virtual ~OutputSurfaceMojo(); |
| + |
| + // SurfaceClient implementation. |
| + virtual void ReturnResources(Array<ReturnedResourcePtr> resources) OVERRIDE; |
| + |
| + // cc::OutputSurface implementation. |
| + virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
| + |
| + private: |
| + SurfacePtr surface_; |
| + cc::SurfaceIdAllocator id_allocator_; |
| + cc::SurfaceId surface_id_; |
| + gfx::Size surface_size_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(OutputSurfaceMojo); |
| +}; |
| +} |
| + |
| +#endif // MOJO_CC_OUTPUT_SURFACE_MOJO_H_ |