5#include "flutter/lib/ui/painting/paint.h"
6#include "flutter/shell/common/shell_test.h"
7#include "flutter/shell/common/thread_host.h"
9#include "flutter/testing/testing.h"
15 auto message_latch = std::make_shared<fml::AutoResetWaitableEvent>();
23 Paint ui_paint(paint_objects, paint_data);
25 message_latch->Signal();
36 AddNativeCallback(
"ConvertPaintToDlPaint",
39 std::unique_ptr<Shell>
shell = CreateShell(
settings, task_runners);
41 ASSERT_TRUE(
shell->IsSetup());
43 configuration.SetEntrypoint(
"convertPaintToDlPaint");
45 shell->RunEngine(std::move(configuration), [](
auto result) {
49 message_latch->Wait();
50 DestroyShell(std::move(
shell), task_runners);
53 ASSERT_EQ(
static_cast<uint32_t
>(dl_paint.
getColor().
argb()), 0x11223344u);
DlBlendMode getBlendMode() const
DlDrawStyle getDrawStyle() const
std::shared_ptr< const DlMaskFilter > getMaskFilter() const
std::shared_ptr< const DlColorFilter > getColorFilter() const
void toDlPaint(DlPaint &paint) const
static RunConfiguration InferFromSettings(const Settings &settings, const fml::RefPtr< fml::TaskRunner > &io_worker=nullptr, IsolateLaunchType launch_type=IsolateLaunchType::kNewGroup)
Attempts to infer a run configuration from the settings object. This tries to create a run configurat...
struct _Dart_Handle * Dart_Handle
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
struct _Dart_NativeArguments * Dart_NativeArguments
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_GetField(Dart_Handle container, Dart_Handle name)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
fml::RefPtr< fml::TaskRunner > CreateNewThread(const std::string &name)
fml::RefPtr< fml::TaskRunner > GetCurrentTaskRunner()
TEST_F(DisplayListTest, Defaults)
@ kStroke
strokes boundary of shapes
@ kInner
fuzzy inside, nothing outside
@ kXor
r = s*(1-da) + d*(1-sa)
Dart_Handle ToDart(const T &object)
constexpr uint32_t argb() const
#define CREATE_NATIVE_ENTRY(native_entry)