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 
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_
Surface & operator=(const Surface &)=delete
bool IsValid() const
Definition: surface.cc:22
bool Present() const
Definition: surface.cc:43
bool DrawDisplayList(const DisplayList &dl) const
Definition: surface.cc:26
Surface(const Surface &)=delete