#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. | |
| static DlMatrix | GetIntegralTransCTM (const DlMatrix &ctm) |
| Snap the translation components of the matrix to integers. | |
| 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|. | |
| static SkM44 | GetIntegralTransCTM (const SkM44 &ctm) |
| Snap the translation components of the matrix to integers. | |
| 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|. | |
| static bool | ComputeIntegralTransCTM (const DlMatrix &in, DlMatrix *out) |
| Snap the translation components of the |in| matrix to integers and store the snapped matrix in |out|. | |
Static Public Attributes | |
| static constexpr int | kDefaultPictureAndDisplayListCacheLimitPerFrame = 3 |
| static constexpr int | kMinimumRendersBeforeCachingFilterLayer = 3 |
Definition at line 16 of file raster_cache_util.h.
|
inlinestatic |
Definition at line 39 of file raster_cache_util.h.
References FML_LOG.
Referenced by flutter::IsDisplayListWorthRasterizing().
|
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 70 of file raster_cache_util.cc.
References impeller::Matrix::IsTranslationScaleOnly(), and impeller::Matrix::m.
|
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 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.
Referenced by GetIntegralTransCTM(), GetIntegralTransCTM(), GetIntegralTransCTM(), flutter::DlCanvasDelegate::integralTransform(), flutter::PrerollDelegate::integralTransform(), flutter::testing::TEST(), and flutter::testing::TEST().
|
inlinestatic |
Definition at line 54 of file raster_cache_util.h.
Referenced by flutter::testing::TEST().
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 99 of file raster_cache_util.h.
References ComputeIntegralTransCTM().
|
inlinestatic |
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 136 of file raster_cache_util.h.
References ComputeIntegralTransCTM().
|
inlinestatic |
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 81 of file raster_cache_util.h.
References ComputeIntegralTransCTM().
Referenced by flutter::RasterCacheResult::draw(), flutter::RasterCache::Rasterize(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST_F().
|
inlinestatic |
Definition at line 60 of file raster_cache_util.h.
Referenced by flutter::RasterCacheResult::draw(), and flutter::RasterCache::Rasterize().
|
staticconstexpr |
Definition at line 21 of file raster_cache_util.h.
Referenced by flutter::testing::TEST_F().
|
staticconstexpr |
Definition at line 37 of file raster_cache_util.h.