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