22 camera_transform_ =
matrix;
26 node_ = std::move(node);
48 if (
renderer.GetContext()->GetCapabilities()->SupportsOffscreenMSAA()) {
49 subpass_target =
renderer.GetRenderTargetCache()->CreateOffscreenMSAA(
55 .storage_mode = StorageMode::kDeviceTransient,
56 .resolve_storage_mode = StorageMode::kDevicePrivate,
57 .load_action = LoadAction::kClear,
58 .store_action = StoreAction::kMultisampleResolve,
61 .storage_mode = StorageMode::kDeviceTransient,
62 .load_action = LoadAction::kDontCare,
63 .store_action = StoreAction::kDontCare,
67 subpass_target =
renderer.GetRenderTargetCache()->CreateOffscreen(
73 .storage_mode = StorageMode::kDevicePrivate,
74 .load_action = LoadAction::kClear,
75 .store_action = StoreAction::kStore,
78 .storage_mode = StorageMode::kDeviceTransient,
79 .load_action = LoadAction::kClear,
80 .store_action = StoreAction::kDontCare,
85 if (!subpass_target.
IsValid()) {
92 if (!scene.
Render(subpass_target, camera_transform_)) {
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the area of the render pass that will be affected when this contents is rendered.
void SetEffectTransform(Matrix matrix)
Set the effect transform for this color source.
void SetGeometry(std::shared_ptr< Geometry > geometry)
Set the geometry that this contents will use to render.
const std::shared_ptr< Geometry > & GetGeometry() const
Get the geometry that this contents will use to render.
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
Render passes encode render commands directed as one specific render target into an underlying comman...
ISize GetRenderTargetSize() const
std::shared_ptr< Texture > GetRenderTargetTexture() const
void SetCameraTransform(Matrix matrix)
~SceneContents() override
void SetNode(std::shared_ptr< scene::Node > node)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
void SetTexture(std::shared_ptr< Texture > texture)
bool AddChild(std::shared_ptr< Node > child)
bool Render(const RenderTarget &render_target, const Matrix &camera_transform)
unsigned useCenter Optional< SkMatrix > matrix
A 4x4 matrix using column-major storage.
constexpr Vector3 GetScale() const
static constexpr Matrix MakeScale(const Vector3 &s)
static constexpr TRect MakeSize(const TSize< U > &size)