Flutter Engine
 
Loading...
Searching...
No Matches
embedder_external_texture_metal.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_EMBEDDER_EMBEDDER_EXTERNAL_TEXTURE_METAL_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_EXTERNAL_TEXTURE_METAL_H_
7
12#include "third_party/skia/include/core/SkImage.h"
13#include "third_party/skia/include/core/SkSize.h"
14
15namespace flutter {
16
18 public:
19 using ExternalTextureCallback = std::function<
20 std::unique_ptr<FlutterMetalExternalTexture>(int64_t, size_t, size_t)>;
21
22 EmbedderExternalTextureMetal(int64_t texture_identifier,
24
26
27 private:
28 const ExternalTextureCallback& external_texture_callback_;
29 sk_sp<DlImage> last_image_;
30
31 sk_sp<DlImage> ResolveTexture(int64_t texture_id,
32 GrDirectContext* context,
33 impeller::AiksContext* aiks_context,
34 const SkISize& size);
35
36 // |flutter::Texture|
37 void Paint(PaintContext& context,
38 const DlRect& bounds,
39 bool freeze,
40 const DlImageSampling sampling) override;
41
42 // |flutter::Texture|
43 void OnGrContextCreated() override;
44
45 // |flutter::Texture|
46 void OnGrContextDestroyed() override;
47
48 // |flutter::Texture|
49 void MarkNewFrameAvailable() override;
50
51 // |flutter::Texture|
52 void OnTextureUnregistered() override;
53
55};
56
57} // namespace flutter
58
59#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_EXTERNAL_TEXTURE_METAL_H_
std::function< std::unique_ptr< FlutterMetalExternalTexture >(int64_t, size_t, size_t)> ExternalTextureCallback
FlutterDesktopBinaryReply callback
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
int64_t texture_id