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