| 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 MOJO_CONVERTERS_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ |
| 6 #define MOJO_CONVERTERS_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ |
| 7 |
| 8 #include "components/mus/public/interfaces/compositor_frame.mojom.h" |
| 9 #include "components/mus/public/interfaces/quads.mojom.h" |
| 7 | 10 |
| 8 namespace cc { | 11 namespace cc { |
| 9 class RenderPass; | 12 class RenderPass; |
| 10 class SharedQuadState; | 13 class SharedQuadState; |
| 11 } // namespace cc | 14 } // namespace cc |
| 12 | 15 |
| 13 namespace mojo { | 16 namespace mojo { |
| 14 | 17 |
| 15 // Classes that inherit from this converter can override the default behavior | 18 // Classes that inherit from this converter can override the default behavior |
| 16 // for converting a mojo::SurfaceDrawState to something cc understands. | 19 // for converting a mojo::SurfaceDrawState to something cc understands. |
| 17 class CustomSurfaceConverter { | 20 class CustomSurfaceConverter { |
| 18 public: | 21 public: |
| 19 virtual bool ConvertSurfaceDrawQuad( | 22 virtual bool ConvertSurfaceDrawQuad( |
| 20 const mus::mojom::QuadPtr& input, | 23 const mus::mojom::QuadPtr& input, |
| 21 const mus::mojom::CompositorFrameMetadataPtr& metadata, | 24 const mus::mojom::CompositorFrameMetadataPtr& metadata, |
| 22 cc::SharedQuadState* sqs, | 25 cc::SharedQuadState* sqs, |
| 23 cc::RenderPass* render_pass) = 0; | 26 cc::RenderPass* render_pass) = 0; |
| 24 | 27 |
| 25 protected: | 28 protected: |
| 26 virtual ~CustomSurfaceConverter() {} | 29 virtual ~CustomSurfaceConverter() {} |
| 27 }; | 30 }; |
| 28 | 31 |
| 29 } // namespace mojo | 32 } // namespace mojo |
| 30 | 33 |
| 31 #endif // MOJO_CONVERTERS_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ | 34 #endif // COMPONENTS_MUS_PUBLIC_CPP_SURFACES_CUSTOM_SURFACE_CONVERTER_H_ |
| OLD | NEW |