Flutter Engine
 
Loading...
Searching...
No Matches
FlutterDarwinContextMetalImpeller.mm File Reference
import "flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.h"
#include "flutter/common/graphics/persistent_cache.h"
#include "flutter/fml/logging.h"
#include "flutter/impeller/renderer/backend/metal/context_mtl.h"
#include "flutter/shell/common/context_options.h"
import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
#include "impeller/entity/mtl/entity_shaders.h"
#include "impeller/entity/mtl/framebuffer_blend_shaders.h"
#include "impeller/entity/mtl/modern_shaders.h"

Go to the source code of this file.

Functions

static FLUTTER_ASSERT_ARC std::shared_ptr< impeller::ContextMTLCreateImpellerContext (const impeller::Flags &flags, const std::shared_ptr< const fml::SyncSwitch > &is_gpu_disabled_sync_switch)
 

Function Documentation

◆ CreateImpellerContext()

static FLUTTER_ASSERT_ARC std::shared_ptr< impeller::ContextMTL > CreateImpellerContext ( const impeller::Flags flags,
const std::shared_ptr< const fml::SyncSwitch > &  is_gpu_disabled_sync_switch 
)
static

Definition at line 18 of file FlutterDarwinContextMetalImpeller.mm.

20 {
21 std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
22 std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_data,
23 impeller_entity_shaders_length),
24 std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_data,
25 impeller_modern_shaders_length),
26 std::make_shared<fml::NonOwnedMapping>(impeller_framebuffer_blend_shaders_data,
27 impeller_framebuffer_blend_shaders_length),
28 };
29 return impeller::ContextMTL::Create(flags, shader_mappings, is_gpu_disabled_sync_switch,
30 "Impeller Library");
31}
static std::shared_ptr< ContextMTL > Create(const Flags &flags, const std::vector< std::string > &shader_library_paths, std::shared_ptr< const fml::SyncSwitch > is_gpu_disabled_sync_switch)