diff --git a/impeller/entity/contents/contents.h b/impeller/entity/contents/contents.h index e06af8a2a0638..6a25261ac0c4e 100644 --- a/impeller/entity/contents/contents.h +++ b/impeller/entity/contents/contents.h @@ -66,7 +66,14 @@ class Contents { RenderPass& pass) const = 0; //---------------------------------------------------------------------------- - /// @brief Get the screen space bounding rectangle that this contents affects. + /// @brief Get the area of the render pass that will be affected when this + /// contents is rendered. + /// + /// During rendering, coverage coordinates count pixels from the top + /// left corner of the framebuffer. + /// + /// @return The coverage rectangle. An `std::nullopt` result means that + /// rendering this contents has no effect on the output color. /// virtual std::optional GetCoverage(const Entity& entity) const = 0; @@ -89,11 +96,14 @@ class Contents { virtual bool IsOpaque() const; //---------------------------------------------------------------------------- - /// @brief Given the current screen space bounding rectangle of the clip + /// @brief Given the current pass space bounding rectangle of the clip /// buffer, return the expected clip coverage after this draw call. /// This should only be implemented for contents that may write to the /// clip buffer. /// + /// During rendering, coverage coordinates count pixels from the top + /// left corner of the framebuffer. + /// virtual ClipCoverage GetClipCoverage( const Entity& entity, const std::optional& current_clip_coverage) const; diff --git a/impeller/entity/entity.h b/impeller/entity/entity.h index 9b210d0c19482..26fa0b3974e14 100644 --- a/impeller/entity/entity.h +++ b/impeller/entity/entity.h @@ -71,8 +71,10 @@ class Entity { ~Entity(); + /// @brief Get the global transformation matrix for this Entity. const Matrix& GetTransformation() const; + /// @brief Set the global transformation matrix for this Entity. void SetTransformation(const Matrix& transformation); std::optional GetCoverage() const;