Flutter Impeller
lazy_drawable_holder.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_IMPELLER_RENDERER_BACKEND_METAL_LAZY_DRAWABLE_HOLDER_H_
6
#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_LAZY_DRAWABLE_HOLDER_H_
7
8
#include <Metal/Metal.h>
9
10
#include <future>
11
#include "
impeller/core/texture_descriptor.h
"
12
#include "
impeller/renderer/backend/metal/texture_mtl.h
"
13
14
@protocol
CAMetalDrawable;
15
@class
CAMetalLayer;
16
17
namespace
impeller
{
18
19
/// @brief Create a deferred drawable from a CAMetalLayer.
20
std::shared_future<id<CAMetalDrawable>>
GetDrawableDeferred
(
21
CAMetalLayer* layer);
22
23
/// @brief Create a TextureMTL from a deferred drawable.
24
///
25
/// This function is safe to call multiple times and will only call
26
/// nextDrawable once.
27
std::shared_ptr<TextureMTL>
CreateTextureFromDrawableFuture
(
28
TextureDescriptor desc,
29
const
std::shared_future<id<CAMetalDrawable>>& drawble_future);
30
31
}
// namespace impeller
32
33
#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_LAZY_DRAWABLE_HOLDER_H_
texture_descriptor.h
impeller::CreateTextureFromDrawableFuture
std::shared_ptr< TextureMTL > CreateTextureFromDrawableFuture(TextureDescriptor desc, const std::shared_future< id< CAMetalDrawable >> &drawble_future)
Create a TextureMTL from a deferred drawable.
Definition:
lazy_drawable_holder.mm:41
impeller::GetDrawableDeferred
std::shared_future< id< CAMetalDrawable > > GetDrawableDeferred(CAMetalLayer *layer)
Create a deferred drawable from a CAMetalLayer.
Definition:
lazy_drawable_holder.mm:23
texture_mtl.h
impeller
Definition:
aiks_blur_unittests.cc:20
impeller
renderer
backend
metal
lazy_drawable_holder.h
Generated by
1.8.17