Flutter iOS Embedder
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
ios_context_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_CONTEXT_NOOP_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_NOOP_H_
7 
9 
10 namespace flutter {
11 
12 /// @brief A noop rendering context for usage on simulators without metal support.
13 class IOSContextNoop final : public IOSContext {
14  public:
16 
17  // |IOSContext|
19 
20  // |IOSContext|
21  sk_sp<GrDirectContext> CreateResourceContext() override;
22 
23  // |IOSContext|
24  sk_sp<GrDirectContext> GetMainContext() const override;
25 
26  // |IOSContext|
27  std::unique_ptr<GLContextResult> MakeCurrent() override;
28 
29  // |IOSContext|
30  std::unique_ptr<Texture> CreateExternalTexture(int64_t texture_id,
31  NSObject<FlutterTexture>* texture) override;
32 
33  IOSRenderingBackend GetBackend() const override;
34 
35  private:
36  IOSContextNoop(const IOSContextNoop&) = delete;
37 
38  IOSContextNoop& operator=(const IOSContextNoop&) = delete;
39 };
40 
41 } // namespace flutter
42 
43 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_NOOP_H_
Manages the lifetime of the on-screen and off-screen rendering contexts on iOS. On-screen contexts ar...
Definition: ios_context.h:39
A noop rendering context for usage on simulators without metal support.
std::unique_ptr< GLContextResult > MakeCurrent() override
When using client rendering APIs whose contexts need to be bound to a specific thread,...
sk_sp< GrDirectContext > CreateResourceContext() override
Create a resource context for use on the IO task runner. This resource context is used by Skia to upl...
IOSRenderingBackend GetBackend() const override
Get the rendering backend used by this context.
std::unique_ptr< Texture > CreateExternalTexture(int64_t texture_id, NSObject< FlutterTexture > *texture) override
Creates an external texture proxy of the appropriate client rendering API.
sk_sp< GrDirectContext > GetMainContext() const override
Accessor for the Skia context associated with IOSSurfaces and the raster thread.
int64_t texture_id