Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
ios_context_metal_impeller.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_METAL_IMPELLER_H_
6#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_METAL_IMPELLER_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.h"
10#include "flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalSkia.h"
11#include "flutter/shell/platform/darwin/ios/ios_context.h"
12
13namespace impeller {
14
15class Context;
16
17} // namespace impeller
18
19namespace flutter {
20
21class IOSContextMetalImpeller final : public IOSContext {
22 public:
24 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch);
25
27
29
30 // |IOSContext|
32
34
35 private:
37
38 // |IOSContext|
40
41 // |IOSContext|
42 std::unique_ptr<GLContextResult> MakeCurrent() override;
43
44 // |IOSContext|
45 std::unique_ptr<Texture> CreateExternalTexture(
46 int64_t texture_id,
47 fml::scoped_nsobject<NSObject<FlutterTexture>> texture) override;
48
49 // |IOSContext|
50 std::shared_ptr<impeller::Context> GetImpellerContext() const override;
51
53};
54
55} // namespace flutter
56
57#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_METAL_IMPELLER_H_
IOSContextMetalImpeller(const std::shared_ptr< const fml::SyncSwitch > &is_gpu_disabled_sync_switch)
sk_sp< GrDirectContext > GetResourceContext() const
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...
std::unique_ptr< Texture > CreateExternalTexture(int64_t texture_id, fml::scoped_nsobject< NSObject< FlutterTexture > > texture) override
Creates an external texture proxy of the appropriate client rendering API.
std::unique_ptr< GLContextResult > MakeCurrent() override
When using client rendering APIs whose contexts need to be bound to a specific thread,...
std::shared_ptr< impeller::Context > GetImpellerContext() const override
IOSRenderingBackend GetBackend() const override
Get the rendering backend used by this context.
sk_sp< GrDirectContext > GetMainContext() const override
Accessor for the Skia context associated with IOSSurfaces and the raster thread.
Manages the lifetime of the on-screen and off-screen rendering contexts on iOS. On-screen contexts ar...
Definition ios_context.h:40
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
FlTexture * texture
int64_t texture_id