9 #include "impeller/entity/contents/test/recording_render_pass.h"
14 #include "third_party/googletest/googletest/include/gtest/gtest.h"
23 texture_desc.
size = {100, 100};
28 GetContext()->GetResourceAllocator()->CreateTexture(texture_desc);
35 auto buffer = content_context.
GetContext()->CreateCommandBuffer();
37 GetContentContext().GetRenderTargetCache()->CreateOffscreenMSAA(
40 auto render_pass = buffer->CreateRenderPass(render_target);
41 auto recording_pass = std::make_shared<RecordingRenderPass>(
44 ASSERT_TRUE(contents.
Render(GetContentContext(), {}, *recording_pass));
45 const std::vector<Command>& commands = recording_pass->GetCommands();
47 ASSERT_EQ(commands.size(), 1u);
49 EXPECT_TRUE(commands[0].
pipeline->GetDescriptor().GetLabel().find(
50 "TextureFill Pipeline") != std::string::npos);
55 GetContentContext().GetTiledTexturePipeline(options));
58 recording_pass->EncodeCommands();
63 #if !defined(FML_OS_MACOSX)
68 <<
"External OES textures are only valid for the OpenGLES backend.";
72 texture_desc.
size = {100, 100};
77 GetContext()->GetResourceAllocator()->CreateTexture(texture_desc);
79 contents->SetTexture(texture);
81 contents->SetStrictSourceRect(
false);
84 auto buffer = content_context.
GetContext()->CreateCommandBuffer();
86 GetContentContext().GetRenderTargetCache()->CreateOffscreenMSAA(
89 auto render_pass = buffer->CreateRenderPass(render_target);
91 ASSERT_TRUE(contents->Render(GetContentContext(), {}, *
render_pass));
92 const std::vector<Command>& commands =
render_pass->GetCommands();
94 ASSERT_EQ(commands.size(), 1u);
99 GetContentContext().GetTiledTextureExternalPipeline(options));
std::shared_ptr< Context > GetContext() const
static std::unique_ptr< Geometry > MakeCover()
static std::shared_ptr< TextureContents > MakeRect(Rect destination)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
void SetTexture(std::shared_ptr< Texture > texture)
TEST_P(AiksTest, DrawAtlasNoColor)
ContentContextOptions OptionsFromPassAndEntity(const RenderPass &pass, const Entity &entity)
std::shared_ptr< RenderPass > render_pass
std::shared_ptr< PipelineGLES > pipeline
PrimitiveType primitive_type
constexpr static TRect MakeSize(const TSize< U > &size)
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...