Flutter Engine
flutter::testing::EmbedderTestBackingStoreProducer Class Reference

#include <embedder_test_backingstore_producer.h>

Public Types

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

Public Member Functions

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

Detailed Description

Definition at line 16 of file embedder_test_backingstore_producer.h.

Member Enumeration Documentation

◆ RenderTargetType

Enumerator
kSoftwareBuffer 
kOpenGLFramebuffer 
kOpenGLTexture 

Definition at line 18 of file embedder_test_backingstore_producer.h.

18  {
19  kSoftwareBuffer,
20  kOpenGLFramebuffer,
21  kOpenGLTexture,
22  };

Constructor & Destructor Documentation

◆ EmbedderTestBackingStoreProducer()

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

Definition at line 13 of file embedder_test_backingstore_producer.cc.

References ~EmbedderTestBackingStoreProducer().

16  : context_(context), type_(type) {}

◆ ~EmbedderTestBackingStoreProducer()

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

Member Function Documentation

◆ Create()

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

Definition at line 20 of file embedder_test_backingstore_producer.cc.

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

22  {
23  switch (type_) {
25  return CreateSoftware(config, renderer_out);
26 #ifdef SHELL_ENABLE_GL
28  return CreateTexture(config, renderer_out);
30  return CreateFramebuffer(config, renderer_out);
31 #endif
32  default:
33  return false;
34  }
35 }

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