Flutter Engine
The Flutter Engine
impeller
renderer
backend
metal
texture_wrapper_mtl.mm
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
#include "
impeller/renderer/backend/metal/texture_wrapper_mtl.h
"
6
7
#include <Metal/Metal.h>
8
9
#include "
impeller/renderer/backend/metal/formats_mtl.h
"
10
#include "
impeller/renderer/backend/metal/texture_mtl.h
"
11
12
namespace
impeller
{
13
14
std::shared_ptr<Texture>
WrapTextureMTL
(
TextureDescriptor
desc
,
15
const
void
* mtl_texture,
16
std::function
<
void
()> deletion_proc) {
17
auto
texture
= (__bridge id<MTLTexture>)mtl_texture;
18
desc
.format =
FromMTLPixelFormat
(
texture
.pixelFormat);
19
return
TextureMTL::Wrapper
(
desc
,
texture
, std::move(deletion_proc));
20
}
21
22
}
// namespace impeller
impeller::TextureMTL::Wrapper
static std::shared_ptr< TextureMTL > Wrapper(TextureDescriptor desc, id< MTLTexture > texture, std::function< void()> deletion_proc=nullptr)
Definition:
texture_mtl.mm:40
formats_mtl.h
function
Dart_NativeFunction function
Definition:
fuchsia.cc:51
texture
FlTexture * texture
Definition:
mock_texture_registrar.cc:24
impeller
Definition:
texture.h:18
impeller::FromMTLPixelFormat
constexpr PixelFormat FromMTLPixelFormat(MTLPixelFormat format)
Definition:
formats_mtl.h:22
impeller::WrapTextureMTL
std::shared_ptr< Texture > WrapTextureMTL(TextureDescriptor desc, const void *mtl_texture, std::function< void()> deletion_proc=nullptr)
Definition:
texture_wrapper_mtl.mm:14
import_conformance_tests.desc
desc
Definition:
import_conformance_tests.py:63
impeller::TextureDescriptor
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
Definition:
texture_descriptor.h:37
texture_mtl.h
texture_wrapper_mtl.h
Generated on Sun Jun 23 2024 21:55:03 for Flutter Engine by
1.9.4