23 TestMessage(
int i,
float f) :
x(
i),
y(
f) {}
40 TestMessageBus::Inbox inbox1(0), inbox2(0);
43 const TestMessage m1 = { 5, 4.2f };
44 const TestMessage m2 = { 6, 4.3f };
45 TestMessageBus::Post(std::move(m1));
46 TestMessageBus::Post(std::move(m2));
50 inbox1.poll(&messages);
56 const TestMessage m3 = { 1, 0.3f };
57 TestMessageBus::Post(m3);
58 inbox1.poll(&messages);
63 inbox1.poll(&messages);
67 inbox2.poll(&messages);
76struct TestMessageRefCnt :
public SkRefCnt {
77 TestMessageRefCnt(
int i,
float f) :
x(
i),
y(
f) {}
94 TestMessageBus::Inbox inbox1(0);
97 auto m1 = sk_make_sp<TestMessageRefCnt>(5, 4.2f);
98 auto m2 = sk_make_sp<TestMessageRefCnt>(6, 4.3f);
99 TestMessageBus::Post(std::move(m1));
100 TestMessageBus::Post(std::move(m2));
104 inbox1.poll(&messages);
112 auto m3 = sk_make_sp<TestMessageRefCnt>(1, 0.3f);
113 TestMessageBus::Post(std::move(m3));
114 inbox1.poll(&messages);
124 inbox1.poll(&messages);
130struct AddressedMessage {
137 if (!msg.fInboxID.isValid()) {
140 return msgBusUniqueID == msg.fInboxID;
156 AddressedMessageBus::Inbox inbox1(id1), inbox2(id2);
158 AddressedMessageBus::Post({idInvalid});
159 AddressedMessageBus::Post({id1});
160 AddressedMessageBus::Post({id2});
161 AddressedMessageBus::Post({id3});
164 inbox1.poll(&messages);
166 if (messages.size() == 2) {
170 inbox2.poll(&messages);
172 if (messages.size() == 2) {
bool SkShouldPostMessageToBus(const GrClientMappedBufferManager::BufferFinishedMessage &, GrDirectContext::DirectContextID potentialRecipient)
#define DECLARE_SKMESSAGEBUS_MESSAGE(Message, IDType, AllowCopyableMessage)
#define REPORTER_ASSERT(r, cond,...)