| Flutter iOS Embedder |

ios_surface_noop.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_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_NOOP_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_NOOP_H_
7
8 #include "flutter/fml/platform/darwin/scoped_nsobject.h"
9 #import "flutter/shell/platform/darwin/ios/ios_context.h"
10 #import "flutter/shell/platform/darwin/ios/ios_surface.h"
11
12 #include "third_party/skia/include/core/SkSurface.h"
13
14 @class CALayer;
15
16 namespace flutter {
17
18 /// @brief A rendering surface that accepts rendering intent but does not render
19 /// anything.
20 ///
21 /// This is useful for running on platforms that need an engine instance and
22 /// don't have the required drivers.
23 class IOSSurfaceNoop final : public IOSSurface {
24 public:
25 explicit IOSSurfaceNoop(std::shared_ptr<IOSContext> context);
26
27 ~IOSSurfaceNoop() override;
28
29 // |IOSSurface|
30 bool IsValid() const override;
31
32 // |IOSSurface|
33 void UpdateStorageSizeIfNecessary() override;
34
35 // |IOSSurface|
36 std::unique_ptr<Surface> CreateGPUSurface(GrDirectContext* gr_context = nullptr) override;
37
38 private:
39 IOSSurfaceNoop(const IOSSurfaceNoop&) = delete;
40
41 IOSSurfaceNoop& operator=(const IOSSurfaceNoop&) = delete;
42 };
43
44 } // namespace flutter
45
46 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_NOOP_H_
flutter::IOSSurfaceNoop::IsValid
bool IsValid() const override
Definition: ios_surface_noop.mm:28
flutter::IOSSurfaceNoop::IOSSurfaceNoop
IOSSurfaceNoop(std::shared_ptr< IOSContext > context)
Definition: ios_surface_noop.mm:23
flutter::IOSSurfaceNoop::CreateGPUSurface
std::unique_ptr< Surface > CreateGPUSurface(GrDirectContext *gr_context=nullptr) override
Definition: ios_surface_noop.mm:34
flutter::IOSSurface
Definition: ios_surface.h:21
ios_surface.h
flutter::IOSSurfaceNoop::~IOSSurfaceNoop
~IOSSurfaceNoop() override
flutter
Definition: accessibility_bridge.h:28
flutter::IOSSurfaceNoop::UpdateStorageSizeIfNecessary
void UpdateStorageSizeIfNecessary() override
Definition: ios_surface_noop.mm:32
flutter::IOSSurfaceNoop
A rendering surface that accepts rendering intent but does not render anything.
Definition: ios_surface_noop.h:23
ios_context.h