Flutter Engine
flutter::testing::EmbedderTestBackingStoreProducer Class Reference

#include <embedder_test_backingstore_producer.h>

Public Types

enum  RenderTargetType {
  RenderTargetType::kSoftwareBuffer,
  RenderTargetType::kOpenGLFramebuffer,
  RenderTargetType::kOpenGLTexture,
  RenderTargetType::kMetalTexture
}
 

Public Member Functions

 EmbedderTestBackingStoreProducer (sk_sp< GrDirectContext > context, RenderTargetType type)
 
 ~EmbedderTestBackingStoreProducer ()
 
bool Create (const FlutterBackingStoreConfig *config, FlutterBackingStore *renderer_out)
 

Detailed Description

Definition at line 20 of file embedder_test_backingstore_producer.h.

Member Enumeration Documentation

◆ RenderTargetType

Enumerator
kSoftwareBuffer 
kOpenGLFramebuffer 
kOpenGLTexture 
kMetalTexture 

Definition at line 22 of file embedder_test_backingstore_producer.h.

22  {
23  kSoftwareBuffer,
24  kOpenGLFramebuffer,
25  kOpenGLTexture,
26  kMetalTexture,
27  };

Constructor & Destructor Documentation

◆ EmbedderTestBackingStoreProducer()

flutter::testing::EmbedderTestBackingStoreProducer::EmbedderTestBackingStoreProducer ( sk_sp< GrDirectContext >  context,
RenderTargetType  type 
)

Definition at line 17 of file embedder_test_backingstore_producer.cc.

References ~EmbedderTestBackingStoreProducer().

20  : context_(context),
21  type_(type)
22 #ifdef SHELL_ENABLE_METAL
23  ,
24  test_metal_context_(std::make_unique<TestMetalContext>())
25 #endif
26 {
27 }
GdkEventType type
Definition: fl_view.cc:80

◆ ~EmbedderTestBackingStoreProducer()

flutter::testing::EmbedderTestBackingStoreProducer::~EmbedderTestBackingStoreProducer ( )
default

Member Function Documentation

◆ Create()

bool flutter::testing::EmbedderTestBackingStoreProducer::Create ( const FlutterBackingStoreConfig config,
FlutterBackingStore renderer_out 
)

Definition at line 31 of file embedder_test_backingstore_producer.cc.

References FlutterSoftwareBackingStore::allocation, FlutterOpenGLTexture::destruction_callback, FlutterOpenGLFramebuffer::destruction_callback, FlutterMetalTexture::destruction_callback, FlutterSoftwareBackingStore::destruction_callback, FML_LOG, FlutterOpenGLTexture::format, FlutterOpenGLBackingStore::framebuffer, FlutterSize::height, FlutterSoftwareBackingStore::height, kFlutterBackingStoreTypeMetal, kFlutterBackingStoreTypeOpenGL, kFlutterBackingStoreTypeSoftware, kFlutterOpenGLTargetTypeFramebuffer, kFlutterOpenGLTargetTypeTexture, kMetalTexture, kOpenGLFramebuffer, kOpenGLTexture, kSoftwareBuffer, FlutterBackingStore::metal, FlutterOpenGLTexture::name, FlutterOpenGLFramebuffer::name, FlutterBackingStore::open_gl, FlutterSoftwareBackingStore::row_bytes, FlutterBackingStoreConfig::size, FlutterBackingStore::software, FlutterMetalBackingStore::struct_size, FlutterOpenGLTexture::target, FlutterOpenGLFramebuffer::target, texture, FlutterMetalTexture::texture, FlutterOpenGLBackingStore::texture, FlutterMetalBackingStore::texture, FlutterOpenGLBackingStore::type, FlutterBackingStore::type, user_data, FlutterOpenGLTexture::user_data, FlutterOpenGLFramebuffer::user_data, FlutterMetalTexture::user_data, FlutterSoftwareBackingStore::user_data, FlutterBackingStore::user_data, and FlutterSize::width.

33  {
34  switch (type_) {
36  return CreateSoftware(config, renderer_out);
37 #ifdef SHELL_ENABLE_GL
39  return CreateTexture(config, renderer_out);
41  return CreateFramebuffer(config, renderer_out);
42 #endif
43 #ifdef SHELL_ENABLE_METAL
45  return CreateMTLTexture(config, renderer_out);
46 #endif
47  default:
48  return false;
49  }
50 }

The documentation for this class was generated from the following files: