5#include "flutter/testing/testing.h"
19 static_assert(
sizeof(Length2) == 2u);
23 for (
size_t i = 0;
i < 12500;
i++) {
24 auto view =
buffer->Emplace(Length2{});
26 ASSERT_EQ(view.range,
Range(
i *
sizeof(Length2), 2u));
34 static_assert(
sizeof(Length2) == 2);
35 struct alignas(16) Align16 {
38 static_assert(
alignof(Align16) == 16);
39 static_assert(
sizeof(Align16) == 16);
45 auto view =
buffer->Emplace(Length2{});
47 ASSERT_EQ(view.range,
Range(0u, 2u));
51 auto view =
buffer->Emplace(Align16{});
53 ASSERT_EQ(view.range.offset, 16u);
54 ASSERT_EQ(view.range.length, 16u);
57 auto view =
buffer->Emplace(Length2{});
59 ASSERT_EQ(view.range,
Range(32u, 2u));
63 auto view =
buffer->Emplace(Align16{});
65 ASSERT_EQ(view.range.offset, 48u);
66 ASSERT_EQ(view.range.length, 16u);
73 EXPECT_EQ(
buffer->GetStateForTest().current_buffer, 0u);
74 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 0u);
75 EXPECT_EQ(
buffer->GetStateForTest().total_buffer_count, 1u);
81 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 0u);
84 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 1u);
87 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 2u);
90 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 0u);
94 EmplacingLargerThanBlockSizeCreatesOneOffBufferCallback) {
101 EXPECT_EQ(
buffer->GetStateForTest().current_buffer, 0u);
102 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 0u);
103 EXPECT_EQ(
buffer->GetStateForTest().total_buffer_count, 1u);
113 EXPECT_EQ(
buffer->GetStateForTest().current_buffer, 0u);
114 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 0u);
115 EXPECT_EQ(
buffer->GetStateForTest().total_buffer_count, 1u);
122 auto buffer_view_a =
buffer->Emplace(1020000, 0, [](uint8_t*
data) {});
123 auto buffer_view_b =
buffer->Emplace(1020000, 0, [](uint8_t*
data) {});
125 EXPECT_EQ(
buffer->GetStateForTest().current_buffer, 1u);
126 EXPECT_EQ(
buffer->GetStateForTest().total_buffer_count, 2u);
127 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 0u);
130 for (
auto i = 0;
i < 3;
i++) {
134 EXPECT_EQ(
buffer->GetStateForTest().current_buffer, 0u);
135 EXPECT_EQ(
buffer->GetStateForTest().total_buffer_count, 2u);
136 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 0u);
140 for (
auto i = 0;
i < 3;
i++) {
144 EXPECT_EQ(
buffer->GetStateForTest().current_buffer, 0u);
145 EXPECT_EQ(
buffer->GetStateForTest().total_buffer_count, 1u);
146 EXPECT_EQ(
buffer->GetStateForTest().current_frame, 0u);
155 view =
buffer->Emplace(64, 16, [](uint8_t*) {});
static std::shared_ptr< HostBuffer > Create(const std::shared_ptr< Allocator > &allocator)
SK_API GrDirectContext * GetContext(const SkImage *src)
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)
std::shared_ptr< const fml::Mapping > data