#include "flutter/shell/platform/linux/public/flutter_linux/fl_texture_registrar.h"#include "flutter/shell/platform/embedder/test_utils/proc_table_replacement.h"#include "flutter/shell/platform/linux/fl_engine_private.h"#include "flutter/shell/platform/linux/fl_texture_registrar_private.h"#include "flutter/shell/platform/linux/public/flutter_linux/fl_pixel_buffer_texture.h"#include "flutter/shell/platform/linux/public/flutter_linux/fl_texture_gl.h"#include "flutter/shell/platform/linux/testing/mock_texture_registrar.h"#include "gtest/gtest.h"#include <epoxy/gl.h>#include <gmodule.h>#include <pthread.h>Go to the source code of this file.
Functions | |
| G_DECLARE_FINAL_TYPE (FlTestRegistrarTexture, fl_test_registrar_texture, FL, TEST_REGISTRAR_TEXTURE, FlTextureGL) struct _FlTestRegistrarTexture | |
| A simple texture. | |
| G_DEFINE_TYPE (FlTestRegistrarTexture, fl_test_registrar_texture, fl_texture_gl_get_type()) static gboolean fl_test_registrar_texture_populate(FlTextureGL *texture | |
| static void | fl_test_registrar_texture_class_init (FlTestRegistrarTextureClass *klass) |
| static void | fl_test_registrar_texture_init (FlTestRegistrarTexture *self) |
| static FlTestRegistrarTexture * | fl_test_registrar_texture_new () |
| static void * | add_mock_texture_to_registrar (void *pointer) |
| TEST (FlTextureRegistrarTest, MockRegistrar) | |
| TEST (FlTextureRegistrarTest, RegisterTexture) | |
| TEST (FlTextureRegistrarTest, MarkTextureFrameAvailable) | |
| TEST (FlTextureRegistrarTest, MarkInvalidTextureFrameAvailable) | |
| TEST (FlTextureRegistrarTest, DISABLED_RegistrarRegisterTextureInMultipleThreads) | |
Variables | |
| static constexpr uint32_t | kBufferWidth = 4u |
| static constexpr uint32_t | kBufferHeight = 4u |
| static constexpr uint32_t | kRealBufferWidth = 2u |
| static constexpr uint32_t | kRealBufferHeight = 2u |
| static constexpr uint64_t | kThreadCount = 16u |
| uint32_t * | target = GL_TEXTURE_2D |
| uint32_t uint32_t * | format = GL_R8 |
| uint32_t uint32_t uint32_t * | width = kRealBufferWidth |
| uint32_t uint32_t uint32_t uint32_t * | height = kRealBufferHeight |
| uint32_t uint32_t uint32_t uint32_t GError ** | error |
| return | TRUE |
|
static |
Definition at line 70 of file fl_texture_registrar_test.cc.
References fl_test_registrar_texture_new(), fl_texture_get_id(), fl_texture_registrar_register_texture(), g_autoptr(), and texture.
Referenced by TEST().
|
static |
Definition at line 58 of file fl_texture_registrar_test.cc.
|
static |
Definition at line 63 of file fl_texture_registrar_test.cc.
|
static |
Definition at line 65 of file fl_texture_registrar_test.cc.
Referenced by add_mock_texture_to_registrar(), TEST(), TEST(), TEST(), and TEST().
| G_DECLARE_FINAL_TYPE | ( | FlTestRegistrarTexture | , |
| fl_test_registrar_texture | , | ||
| FL | , | ||
| TEST_REGISTRAR_TEXTURE | , | ||
| FlTextureGL | |||
| ) |
A simple texture.
Definition at line 25 of file fl_texture_registrar_test.cc.
| G_DEFINE_TYPE | ( | FlTestRegistrarTexture | , |
| fl_test_registrar_texture | , | ||
| fl_texture_gl_get_type() | |||
| ) |
| TEST | ( | FlTextureRegistrarTest | , |
| DISABLED_RegistrarRegisterTextureInMultipleThreads | |||
| ) |
Definition at line 187 of file fl_texture_registrar_test.cc.
References add_mock_texture_to_registrar(), engine, fl_dart_project_new(), fl_engine_get_embedder_api(), fl_engine_new(), fl_texture_registrar_lookup_texture(), fl_texture_registrar_new(), g_autoptr(), id, kSuccess, kThreadCount, MOCK_ENGINE_PROC, FlutterEngineProcTable::RegisterExternalTexture, texture_id, and FlutterEngineProcTable::UnregisterExternalTexture.
| TEST | ( | FlTextureRegistrarTest | , |
| MarkInvalidTextureFrameAvailable | |||
| ) |
Definition at line 158 of file fl_texture_registrar_test.cc.
References engine, fl_dart_project_new(), fl_engine_get_embedder_api(), fl_engine_new(), fl_test_registrar_texture_new(), fl_texture_registrar_mark_texture_frame_available(), fl_texture_registrar_new(), fl_texture_registrar_register_texture(), g_autoptr(), kInternalInconsistency, kSuccess, FlutterEngineProcTable::MarkExternalTextureFrameAvailable, MOCK_ENGINE_PROC, FlutterEngineProcTable::RegisterExternalTexture, texture, texture_id, and FlutterEngineProcTable::UnregisterExternalTexture.
| TEST | ( | FlTextureRegistrarTest | , |
| MarkTextureFrameAvailable | |||
| ) |
Definition at line 129 of file fl_texture_registrar_test.cc.
References engine, fl_dart_project_new(), fl_engine_get_embedder_api(), fl_engine_new(), fl_test_registrar_texture_new(), fl_texture_registrar_mark_texture_frame_available(), fl_texture_registrar_new(), fl_texture_registrar_register_texture(), g_autoptr(), kSuccess, FlutterEngineProcTable::MarkExternalTextureFrameAvailable, MOCK_ENGINE_PROC, FlutterEngineProcTable::RegisterExternalTexture, texture, texture_id, and FlutterEngineProcTable::UnregisterExternalTexture.
| TEST | ( | FlTextureRegistrarTest | , |
| MockRegistrar | |||
| ) |
Definition at line 81 of file fl_texture_registrar_test.cc.
References fl_mock_texture_registrar_get_frame_available(), fl_mock_texture_registrar_get_texture(), fl_mock_texture_registrar_new(), fl_test_registrar_texture_new(), fl_texture_registrar_mark_texture_frame_available(), fl_texture_registrar_register_texture(), fl_texture_registrar_unregister_texture(), g_autoptr(), and texture.
| TEST | ( | FlTextureRegistrarTest | , |
| RegisterTexture | |||
| ) |
Definition at line 98 of file fl_texture_registrar_test.cc.
References engine, fl_dart_project_new(), fl_engine_get_embedder_api(), fl_engine_new(), fl_test_registrar_texture_new(), fl_texture_registrar_new(), fl_texture_registrar_register_texture(), fl_texture_registrar_unregister_texture(), g_autoptr(), kSuccess, MOCK_ENGINE_PROC, FlutterEngineProcTable::RegisterExternalTexture, texture, texture_id, and FlutterEngineProcTable::UnregisterExternalTexture.
| uint32_t uint32_t uint32_t uint32_t GError** error |
Definition at line 45 of file fl_texture_registrar_test.cc.
| * format = GL_R8 |
Definition at line 42 of file fl_texture_registrar_test.cc.
Referenced by impeller::BytesPerPixelForPixelFormat(), impeller::ChooseSurfaceFormat(), vulkan::VulkanDevice::ChooseSurfaceFormat(), clipboard_get_data(), clipboard_get_data(), flutter::GPUSurfaceVulkan::ColorTypeFromFormat(), impeller::ContainsFormat(), impeller::DecompressedImage::DecompressedImage(), flutter::EncodeImage(), flutter::EncodeImage(), fl_framebuffer_new(), impeller::FromMTLPixelFormat(), impeller::GetBytesPerPixel(), impeller::HasSuitableColorFormat(), impeller::HasSuitableDepthStencilFormat(), impeller::interop::ImpellerSurfaceCreateWrappedFBONew(), InferVulkanPlatformViewCreationCallback(), flutter::testing::DlOpenGLSurfaceProvider::InitializeSurface(), flutter::testing::DlMetalSurfaceProvider::InitializeSurface(), flutter::testing::DlSoftwareSurfaceProvider::InitializeSurface(), InitializeSwapchain(), InternalFlutterGpu_Texture_Initialize(), impeller::IsDepthWritable(), impeller::IsStencilWritable(), tonic::Log(), flutter::testing::DlSurfaceProvider::MakeInfo(), flutter::testing::DlOpenGLSurfaceProvider::MakeOffscreenSurface(), flutter::testing::DlSoftwareSurfaceProvider::MakeOffscreenSurface(), MakeRenderTargetFromBackingStoreImpeller(), MakeSkSurfaceFromBackingStore(), impeller::Allocator::MinimumBytesPerRow(), impeller::testing::mockReadPixels(), impeller::PixelFormatIsDepthStencil(), impeller::PixelFormatToString(), flutter::EmbedderSurfaceVulkan::PresentImage(), flutter::EmbedderSurfaceVulkanImpeller::PresentImage(), flutter::egl::ProcTable::ProcTable(), flutter::Rasterizer::Screenshot::Screenshot(), flutter::Rasterizer::ScreenshotLastLayerTree(), impeller::RenderPassBuilderVK::SetColorAttachment(), impeller::PipelineDescriptor::SetDepthPixelFormat(), impeller::RenderPassBuilderVK::SetDepthStencilAttachment(), impeller::SwapchainTransientsMTL::SetSizeAndFormat(), impeller::RenderPassBuilderVK::SetStencilAttachment(), impeller::PipelineDescriptor::SetStencilPixelFormat(), base::StringPrintf(), flutter::testing::DlOpenGLSurfaceProvider::supports(), flutter::testing::DlMetalSurfaceProvider::supports(), impeller::testing::TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::egl::ProcTable::TexImage2D(), impeller::android::ToAHardwareBufferFormat(), flutter::CanvasImage::toByteData(), impeller::ToImageAspectFlags(), impeller::interop::ToImpellerType(), impeller::ToMTLPixelFormat(), impeller::ToPixelFormat(), impeller::ToPixelFormat(), impeller::ToRenderBufferFormat(), impeller::ToVKImageAspectFlags(), impeller::ToVKImageFormat(), impeller::AllocatorVK::ToVKImageUsageFlags(), impeller::ContextMTL::UpdateOffscreenLayerPixelFormat(), impeller::VkFormatToImpellerFormat(), flutter::WrapOnscreenSurface(), and impeller::WrapTextureWithRenderTarget().
| * height = kRealBufferHeight |
Definition at line 44 of file fl_texture_registrar_test.cc.
|
staticconstexpr |
Definition at line 20 of file fl_texture_registrar_test.cc.
|
staticconstexpr |
Definition at line 19 of file fl_texture_registrar_test.cc.
|
staticconstexpr |
Definition at line 22 of file fl_texture_registrar_test.cc.
|
staticconstexpr |
Definition at line 21 of file fl_texture_registrar_test.cc.
|
staticconstexpr |
Definition at line 23 of file fl_texture_registrar_test.cc.
Referenced by impeller::testing::TEST(), impeller::testing::TEST(), TEST(), and fml::testing::TEST().
| * target = GL_TEXTURE_2D |
Definition at line 41 of file fl_texture_registrar_test.cc.
Referenced by _eglCreateImage(), _glBindTexture(), flutter::FlutterPlatformNodeDelegate::AccessibilityPerformAction(), ui::AXPlatformRelationWin::AddTarget(), impeller::TextureGLES::Bind(), flutter::egl::ProcTable::BindTexture(), flutter::EmbedderRenderTargetCache::CacheRenderTarget(), flutter::AccessibilityBridge::CommitUpdates(), impeller::compiler::Compiler::Compiler(), impeller::TextureGLES::ComputeTypeForBinding(), impeller::SamplerGLES::ConfigureBoundTexture(), impeller::RenderTargetAllocator::CreateOffscreen(), impeller::RenderTargetAllocator::CreateOffscreenMSAA(), tonic::DartInvokeField(), flutter::AccessibilityBridgeMac::DispatchAccessibilityAction(), flutter::AccessibilityBridgeWindows::DispatchAccessibilityAction(), flutter::FlutterWindowsEngine::DispatchSemanticsAction(), impeller::DisplayListToTexture(), fl_test_texture_populate(), fl_texture_gl_populate(), impeller::EntityPassTarget::Flip(), ui::AXPlatformRelationWin::get_target(), ui::AXPlatformNodeBase::GetInvalidValue(), flutter::EmbedderRenderTargetCache::GetRenderTarget(), impeller::GetVKClearValues(), impeller::Matrix::MakeLookAt(), impeller::testing::mockBeginQueryEXT(), impeller::testing::mockBindFramebuffer(), impeller::testing::mockCheckFramebufferStatus(), impeller::testing::mockDiscardFramebufferEXT(), impeller::testing::mockGetQueryObjectui64vEXT(), impeller::testing::mockGetQueryObjectuivEXT(), impeller::interop::testing::PlaygroundTest::OpenPlaygroundHere(), impeller::TextureGLES::SetAsFramebufferAttachment(), impeller::compiler::StringStartsWith(), impeller::compiler::TargetPlatformFromCommandLine(), TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), flutter::egl::ProcTable::TexImage2D(), flutter::egl::ProcTable::TexParameteri(), and flutter::AccessibilityBridgeMac::~AccessibilityBridgeMac().
| return TRUE |
Definition at line 55 of file fl_texture_registrar_test.cc.
| * width = kRealBufferWidth |
Definition at line 43 of file fl_texture_registrar_test.cc.