Flutter Engine
The Flutter Engine
|
#include <raster_cache_util.h>
Static Public Member Functions | |
static bool | CanRasterizeRect (const SkRect &cull_rect) |
static SkRect | GetDeviceBounds (const SkRect &rect, const SkMatrix &ctm) |
static SkRect | GetRoundedOutDeviceBounds (const SkRect &rect, const SkMatrix &ctm) |
static SkMatrix | GetIntegralTransCTM (const SkMatrix &ctm) |
Snap the translation components of the matrix to integers. More... | |
static bool | ComputeIntegralTransCTM (const SkMatrix &in, SkMatrix *out) |
Snap the translation components of the |in| matrix to integers and store the snapped matrix in |out|. More... | |
static SkM44 | GetIntegralTransCTM (const SkM44 &ctm) |
Snap the translation components of the matrix to integers. More... | |
static bool | ComputeIntegralTransCTM (const SkM44 &in, SkM44 *out) |
Snap the translation components of the |in| matrix to integers and store the snapped matrix in |out|. More... | |
Static Public Attributes | |
static constexpr int | kDefaultPictureAndDisplayListCacheLimitPerFrame = 3 |
static constexpr int | kMinimumRendersBeforeCachingFilterLayer = 3 |
Definition at line 15 of file raster_cache_util.h.
|
inlinestatic |
Definition at line 38 of file raster_cache_util.h.
Snap the translation components of the |in| matrix to integers and store the snapped matrix in |out|.
The snapping will only happen if the matrix only has scale and translation transformations. This is used, along with GetRoundedOutDeviceBounds, to ensure that the textures drawn by the raster cache are exactly aligned to physical pixels. Any layers that participate in raster caching must align themselves to physical pixels even when not cached to prevent a change in apparent location if caching is later applied.
The |out| matrix will not be modified if this method returns false.
in | the current transformation matrix. |
out | the storage for the snapped matrix. |
Definition at line 33 of file raster_cache_util.cc.
|
static |
Snap the translation components of the |in| matrix to integers and store the snapped matrix in |out|.
The snapping will only happen if the matrix only has scale and translation transformations. This is used, along with GetRoundedOutDeviceBounds, to ensure that the textures drawn by the raster cache are exactly aligned to physical pixels. Any layers that participate in raster caching must align themselves to physical pixels even when not cached to prevent a change in apparent location if caching is later applied.
The |out| matrix will not be modified if this method returns false.
in | the current transformation matrix. |
out | the storage for the snapped matrix. |
Definition at line 9 of file raster_cache_util.cc.
|
inlinestatic |
Definition at line 53 of file raster_cache_util.h.
Snap the translation components of the matrix to integers.
The snapping will only happen if the matrix only has scale and translation transformations. This is used, along with GetRoundedOutDeviceBounds, to ensure that the textures drawn by the raster cache are exactly aligned to physical pixels. Any layers that participate in raster caching must align themselves to physical pixels even when not cached to prevent a change in apparent location if caching is later applied.
ctm | the current transformation matrix. |
Definition at line 117 of file raster_cache_util.h.
Snap the translation components of the matrix to integers.
The snapping will only happen if the matrix only has scale and translation transformations. This is used, along with GetRoundedOutDeviceBounds, to ensure that the textures drawn by the raster cache are exactly aligned to physical pixels. Any layers that participate in raster caching must align themselves to physical pixels even when not cached to prevent a change in apparent location if caching is later applied.
ctm | the current transformation matrix. |
Definition at line 80 of file raster_cache_util.h.
|
inlinestatic |
Definition at line 59 of file raster_cache_util.h.
|
staticconstexpr |
Definition at line 20 of file raster_cache_util.h.
|
staticconstexpr |
Definition at line 36 of file raster_cache_util.h.