12 #include "third_party/googletest/googletest/include/gtest/gtest.h"
21 texture_desc.
size = {100, 100};
26 GetContext()->GetResourceAllocator()->CreateTexture(texture_desc);
32 auto content_context = GetContentContext();
33 auto buffer = content_context->GetContext()->CreateCommandBuffer();
35 *content_context->GetContext(),
36 *GetContentContext()->GetRenderTargetCache(), {100, 100});
37 auto render_pass = buffer->CreateRenderPass(render_target);
39 ASSERT_TRUE(contents.
Render(*GetContentContext(), {}, *render_pass));
40 const std::vector<Command>& commands = render_pass->GetCommands();
42 ASSERT_EQ(commands.size(), 1u);
43 ASSERT_STREQ(commands[0].pipeline->GetDescriptor().GetLabel().c_str(),
44 "TextureFill Pipeline V#1");
48 #if !defined(FML_OS_MACOSX)
52 "External OES textures are only valid for the OpenGLES backend.");
56 texture_desc.
size = {100, 100};
61 GetContext()->GetResourceAllocator()->CreateTexture(texture_desc);
67 auto content_context = GetContentContext();
68 auto buffer = content_context->GetContext()->CreateCommandBuffer();
70 *content_context->GetContext(),
71 *GetContentContext()->GetRenderTargetCache(), {100, 100});
72 auto render_pass = buffer->CreateRenderPass(render_target);
74 ASSERT_TRUE(contents.
Render(*GetContentContext(), {}, *render_pass));
75 const std::vector<Command>& commands = render_pass->GetCommands();
77 ASSERT_EQ(commands.size(), 1u);
78 ASSERT_STREQ(commands[0].pipeline->GetDescriptor().GetLabel().c_str(),
79 "TextureFill Pipeline V#1");