Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
capture.cc File Reference
#include "impeller/core/capture.h"
#include <initializer_list>
#include <memory>

Go to the source code of this file.

Namespaces

namespace  impeller
 

Macros

#define _CAPTURE_PROPERTY_CAST_DEFINITION(type_name, pascal_name, lower_name)
 
#define _CAPTURE_PROPERTY_DEFINITION(type_name, pascal_name, lower_name)
 

Functions

 impeller::_FOR_EACH_CAPTURE_PROPERTY (_CAPTURE_PROPERTY_CAST_DEFINITION)
 
 impeller::_FOR_EACH_CAPTURE_PROPERTY (_CAPTURE_PROPERTY_DEFINITION)
 

Macro Definition Documentation

◆ _CAPTURE_PROPERTY_CAST_DEFINITION

#define _CAPTURE_PROPERTY_CAST_DEFINITION (   type_name,
  pascal_name,
  lower_name 
)
Value:
std::optional<type_name> CaptureProperty::As##pascal_name() const { \
if (GetType() != Type::k##pascal_name) { \
return std::nullopt; \
} \
return reinterpret_cast<const Capture##pascal_name##Property*>(this) \
->value; \
}

Definition at line 31 of file capture.cc.

32 { \
33 if (GetType() != Type::k##pascal_name) { \
34 return std::nullopt; \
35 } \
36 return reinterpret_cast<const Capture##pascal_name##Property*>(this) \
37 ->value; \
38 }
SkFourByteTag GetType(SkReadBuffer *reader)

◆ _CAPTURE_PROPERTY_DEFINITION

#define _CAPTURE_PROPERTY_DEFINITION (   type_name,
  pascal_name,
  lower_name 
)
Value:
Capture##pascal_name##Property::Capture##pascal_name##Property( \
const std::string& label, type_name value, Options options) \
: CaptureProperty(label, options), value(std::move(value)) {} \
\
std::shared_ptr<Capture##pascal_name##Property> \
Capture##pascal_name##Property::Make(const std::string& label, \
type_name value, Options options) { \
auto result = std::shared_ptr<Capture##pascal_name##Property>( \
new Capture##pascal_name##Property(label, std::move(value), options)); \
return result; \
} \
\
CaptureProperty::Type Capture##pascal_name##Property::GetType() const { \
return Type::k##pascal_name; \
} \
\
void Capture##pascal_name##Property::Invoke( \
const CaptureProcTable& proc_table) { \
proc_table.lower_name(*this); \
}
const char * options
uint8_t value
GAsyncResult * result

Definition at line 42 of file capture.cc.

45 : CaptureProperty(label, options), value(std::move(value)) {} \
46 \
47 std::shared_ptr<Capture##pascal_name##Property> \
48 Capture##pascal_name##Property::Make(const std::string& label, \
49 type_name value, Options options) { \
50 auto result = std::shared_ptr<Capture##pascal_name##Property>( \
51 new Capture##pascal_name##Property(label, std::move(value), options)); \
52 return result; \
53 } \
54 \
55 CaptureProperty::Type Capture##pascal_name##Property::GetType() const { \
56 return Type::k##pascal_name; \
57 } \
58 \
59 void Capture##pascal_name##Property::Invoke( \
60 const CaptureProcTable& proc_table) { \
61 proc_table.lower_name(*this); \
62 }