Flutter Engine
The Flutter Engine
embedder_external_texture_gl.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_GL_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_EXTERNAL_TEXTURE_GL_H_
7
8#include "flutter/common/graphics/texture.h"
9#include "flutter/fml/macros.h"
10#include "flutter/shell/platform/embedder/embedder.h"
12
13namespace flutter {
14
16 public:
18 std::unique_ptr<FlutterOpenGLTexture>(int64_t, size_t, size_t)>;
19
20 EmbedderExternalTextureGL(int64_t texture_identifier,
22
24
25 private:
26 const ExternalTextureCallback& external_texture_callback_;
27 sk_sp<DlImage> last_image_;
28
29 sk_sp<DlImage> ResolveTexture(int64_t texture_id,
30 GrDirectContext* context,
31 const SkISize& size);
32
33 // |flutter::Texture|
34 void Paint(PaintContext& context,
35 const SkRect& bounds,
36 bool freeze,
37 const DlImageSampling sampling) override;
38
39 // |flutter::Texture|
40 void OnGrContextCreated() override;
41
42 // |flutter::Texture|
43 void OnGrContextDestroyed() override;
44
45 // |flutter::Texture|
46 void MarkNewFrameAvailable() override;
47
48 // |flutter::Texture|
49 void OnTextureUnregistered() override;
50
51 FML_DISALLOW_COPY_AND_ASSIGN(EmbedderExternalTextureGL);
52};
53
54} // namespace flutter
55
56#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_EXTERNAL_TEXTURE_GL_H_
EmbedderExternalTextureGL(int64_t texture_identifier, const ExternalTextureCallback &callback)
std::function< std::unique_ptr< FlutterOpenGLTexture >(int64_t, size_t, size_t)> ExternalTextureCallback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
Definition: fuchsia.cc:51
Optional< SkRect > bounds
Definition: SkRecords.h:189
SkSamplingOptions sampling
Definition: SkRecords.h:337
it will be possible to load the file into Perfetto s trace viewer 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
Definition: switches.h:259
Definition: SkSize.h:16
int64_t texture_id