| Flutter Impeller |

surface.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter 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 FLUTTER_IMPELLER_TOOLKIT_INTEROP_SURFACE_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_SURFACE_H_
7
8 #include <memory>
9
10 #include "impeller/renderer/surface.h"
11 #include "impeller/toolkit/interop/context.h"
12 #include "impeller/toolkit/interop/dl.h"
13 #include "impeller/toolkit/interop/impeller.h"
14 #include "impeller/toolkit/interop/object.h"
15
16 namespace impeller::interop {
17
18 class Surface
19 : public Object<Surface, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerSurface)> {
20 public:
21 ~Surface() override;
22
23 Surface(const Surface&) = delete;
24
25 Surface& operator=(const Surface&) = delete;
26
27 bool IsValid() const;
28
29 bool DrawDisplayList(const DisplayList& dl) const;
30
31 bool Present() const;
32
33 protected:
34 explicit Surface(Context& context,
35 std::shared_ptr<impeller::Surface> surface);
36
37 private:
38 ScopedObject<Context> context_;
39 std::shared_ptr<impeller::Surface> surface_;
40 bool is_valid_ = false;
41 };
42
43 } // namespace impeller::interop
44
45 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_SURFACE_H_
impeller::interop::Context
Definition: context.h:16
impeller::interop::DisplayList
Definition: dl.h:16
impeller::interop::Object
Definition: object.h:56
impeller::interop::ScopedObject
Definition: object.h:67
impeller::interop::Surface
Definition: surface.h:19
impeller::interop::Surface::operator=
Surface & operator=(const Surface &)=delete
impeller::interop::Surface::IsValid
bool IsValid() const
Definition: surface.cc:22
impeller::interop::Surface::Present
bool Present() const
Definition: surface.cc:45
impeller::interop::Surface::DrawDisplayList
bool DrawDisplayList(const DisplayList &dl) const
Definition: surface.cc:26
impeller::interop::Surface::~Surface
~Surface() override
impeller::interop::Surface::Surface
Surface(const Surface &)=delete
dl.h
impeller.h
impeller::interop
Definition: context_gles.cc:12
object.h
surface.h
context.h