OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ |
6 #define COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ |
7 | 7 |
8 #include "components/mus/public/interfaces/compositor_frame.mojom.h" | 8 #include "components/mus/public/interfaces/compositor_frame.mojom.h" |
9 #include "components/mus/public/interfaces/quads.mojom.h" | 9 #include "components/mus/public/interfaces/quads.mojom.h" |
10 | 10 |
11 namespace cc { | 11 namespace cc { |
| 12 class CompositorFrameMetadata; |
12 class RenderPass; | 13 class RenderPass; |
13 class SharedQuadState; | 14 class SharedQuadState; |
14 } // namespace cc | 15 } // namespace cc |
15 | 16 |
16 namespace mojo { | 17 namespace mojo { |
17 | 18 |
18 // Classes that inherit from this converter can override the default behavior | 19 // Classes that inherit from this converter can override the default behavior |
19 // for converting a mojo::SurfaceDrawState to something cc understands. | 20 // for converting a mojo::SurfaceDrawState to something cc understands. |
20 class CustomSurfaceConverter { | 21 class CustomSurfaceConverter { |
21 public: | 22 public: |
22 virtual bool ConvertSurfaceDrawQuad( | 23 virtual bool ConvertSurfaceDrawQuad( |
23 const mus::mojom::QuadPtr& input, | 24 const mus::mojom::QuadPtr& input, |
24 const mus::mojom::CompositorFrameMetadataPtr& metadata, | 25 const cc::CompositorFrameMetadata& metadata, |
25 cc::SharedQuadState* sqs, | 26 cc::SharedQuadState* sqs, |
26 cc::RenderPass* render_pass) = 0; | 27 cc::RenderPass* render_pass) = 0; |
27 | 28 |
28 protected: | 29 protected: |
29 virtual ~CustomSurfaceConverter() {} | 30 virtual ~CustomSurfaceConverter() {} |
30 }; | 31 }; |
31 | 32 |
32 } // namespace mojo | 33 } // namespace mojo |
33 | 34 |
34 #endif // COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ | 35 #endif // COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ |
OLD | NEW |