Flutter macOS Embedder
FlutterEmbedderExternalTextureTest.mm File Reference
#import <Foundation/Foundation.h>
#import <Metal/Metal.h>
#include <memory>
#include <vector>
#include "flutter/display_list/display_list.h"
#include "flutter/display_list/dl_builder.h"
#import "flutter/display_list/skia/dl_sk_canvas.h"
#include "flutter/fml/synchronization/sync_switch.h"
#include "flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.h"
#import "flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalSkia.h"
#import "flutter/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterExternalTexture.h"
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/embedder/embedder_external_texture_metal.h"
#include "flutter/testing/autoreleasepool_test.h"
#include "flutter/testing/testing.h"
#include "impeller/display_list/aiks_context.h"
#include "impeller/entity/mtl/entity_shaders.h"
#include "impeller/entity/mtl/framebuffer_blend_shaders.h"
#include "impeller/entity/mtl/modern_shaders.h"
#include "impeller/renderer/backend/metal/context_mtl.h"
#include "third_party/googletest/googletest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkSamplingOptions.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h"

Go to the source code of this file.

Classes

class  TestExternalTexture
 

Namespaces

 flutter
 
 flutter::testing
 

Typedefs

using flutter::testing::FlutterEmbedderExternalTextureTest = AutoreleasePoolTest
 

Functions

static std::shared_ptr< impeller::ContextMTL > CreateImpellerContext ()
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestTextureResolution)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestPopulateExternalTexture)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestPopulateExternalTextureYUVA)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestPopulateExternalTextureYUVA2)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestPopulateUnsupportedExternalTexture)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestTextureResolutionImpeller)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestPopulateExternalTextureImpeller)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestPopulateExternalTextureYUVAImpeller)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestPopulateExternalTextureYUVA2Impeller)
 
 flutter::testing::TEST_F (FlutterEmbedderExternalTextureTest, TestPopulateUnsupportedExternalTextureImpeller)
 

Variables

size_t _height
 
OSType _pixelFormatType
 

Function Documentation

◆ CreateImpellerContext()

static std::shared_ptr<impeller::ContextMTL> CreateImpellerContext ( )
static

Definition at line 34 of file FlutterEmbedderExternalTextureTest.mm.

34  {
35  std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
36  std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_data,
37  impeller_entity_shaders_length),
38  std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_data,
39  impeller_modern_shaders_length),
40  std::make_shared<fml::NonOwnedMapping>(impeller_framebuffer_blend_shaders_data,
41  impeller_framebuffer_blend_shaders_length),
42  };
43  auto sync_switch = std::make_shared<fml::SyncSwitch>(false);
44  return impeller::ContextMTL::Create(shader_mappings, sync_switch, "Impeller Library");
45 }

Referenced by flutter::testing::TEST_F().

Variable Documentation

◆ _height

size_t _height
Initial value:
{
size_t _width

Definition at line 55 of file FlutterEmbedderExternalTextureTest.mm.

Referenced by TestExternalTexture::initWidth:height:pixelFormatType:.

◆ _pixelFormatType

OSType _pixelFormatType