7#include "flutter/testing/testing.h"
8#include "gtest/gtest.h"
20 if (GetContentContext()
21 ->GetDeviceCapabilities()
22 .SupportsImplicitResolvingMSAA()) {
23 GTEST_SKIP() <<
"Implicit MSAA is used on this device.";
25 auto content_context = GetContentContext();
26 auto buffer = content_context->GetContext()->CreateCommandBuffer();
28 GetContentContext()->GetRenderTargetCache()->CreateOffscreenMSAA(
29 *content_context->GetContext(), {100, 100},
34 auto color0 = entity_pass_target.GetRenderTarget()
35 .GetColorAttachments()
38 auto msaa_tex = color0.texture;
39 auto resolve_tex = color0.resolve_texture;
41 entity_pass_target.Flip(
42 *content_context->GetContext()->GetResourceAllocator());
44 color0 = entity_pass_target.GetRenderTarget()
45 .GetColorAttachments()
49 ASSERT_EQ(msaa_tex, color0.texture);
50 ASSERT_NE(resolve_tex, color0.resolve_texture);
54 auto content_context = GetContentContext();
55 auto buffer = content_context->GetContext()->CreateCommandBuffer();
56 auto context = content_context->GetContext();
57 auto& allocator = *context->GetResourceAllocator();
64 context->GetCapabilities()->GetDefaultColorFormat();
72 color0_tex_desc.
format = pixel_format;
76 auto color0_msaa_tex = allocator.CreateTexture(color0_tex_desc);
83 color0.
texture = color0_msaa_tex;
92 auto color0 = entity_pass_target.GetRenderTarget()
93 .GetColorAttachments()
96 auto msaa_tex = color0.texture;
97 auto resolve_tex = color0.resolve_texture;
99 ASSERT_EQ(msaa_tex, resolve_tex);
101 entity_pass_target.Flip(
102 *content_context->GetContext()->GetResourceAllocator());
104 color0 = entity_pass_target.GetRenderTarget()
105 .GetColorAttachments()
109 ASSERT_NE(msaa_tex, color0.texture);
110 ASSERT_NE(resolve_tex, color0.resolve_texture);
111 ASSERT_EQ(color0.texture, color0.resolve_texture);
RenderTarget & SetColorAttachment(const ColorAttachment &attachment, size_t index)
RenderTarget & SetStencilAttachment(std::optional< StencilAttachment > attachment)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
INSTANTIATE_PLAYGROUND_SUITE(AiksTest)
TEST_P(AiksTest, CanRenderAdvancedBlendColorFilterWithSaveLayer)
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
@ kStoreAndMultisampleResolve
std::shared_ptr< Texture > resolve_texture
std::shared_ptr< Texture > texture
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...