OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MOJO_CC_OUTPUT_SURFACE_MOJO_H_ |
| 6 #define MOJO_CC_OUTPUT_SURFACE_MOJO_H_ |
| 7 |
| 8 #include "cc/output/output_surface.h" |
| 9 #include "cc/surfaces/surface_id.h" |
| 10 #include "cc/surfaces/surface_id_allocator.h" |
| 11 #include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h" |
| 12 |
| 13 namespace mojo { |
| 14 |
| 15 class OutputSurfaceMojo : public cc::OutputSurface, public SurfaceClient { |
| 16 public: |
| 17 OutputSurfaceMojo(const scoped_refptr<cc::ContextProvider>& context_provider, |
| 18 SurfacePtr surface, |
| 19 uint32_t id_namespace); |
| 20 virtual ~OutputSurfaceMojo(); |
| 21 |
| 22 // SurfaceClient implementation. |
| 23 virtual void ReturnResources(Array<ReturnedResourcePtr> resources) OVERRIDE; |
| 24 |
| 25 // cc::OutputSurface implementation. |
| 26 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
| 27 |
| 28 private: |
| 29 SurfacePtr surface_; |
| 30 cc::SurfaceIdAllocator id_allocator_; |
| 31 cc::SurfaceId surface_id_; |
| 32 gfx::Size surface_size_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(OutputSurfaceMojo); |
| 35 }; |
| 36 } |
| 37 |
| 38 #endif // MOJO_CC_OUTPUT_SURFACE_MOJO_H_ |
OLD | NEW |