Chromium Code Reviews| Index: cc/playback/discardable_image_map.h |
| diff --git a/cc/playback/discardable_image_map.h b/cc/playback/discardable_image_map.h |
| index 0306e1b7e526bf1e2e1648766f90a3b309413281..7682601562f115ca7ef6d194c889dce63a489994 100644 |
| --- a/cc/playback/discardable_image_map.h |
| +++ b/cc/playback/discardable_image_map.h |
| @@ -20,6 +20,22 @@ class SkImage; |
| namespace cc { |
| +// Helper function to apply the matrix to the rect and return the result. |
| +SkRect MapRect(const SkMatrix& matrix, const SkRect& src); |
| + |
| +// Helper funciton to extract a scale from the matrix. Returns true on success |
| +// and false on failure. |
| +bool ExtractScale(const SkMatrix& matrix, SkSize* scale); |
| + |
| +// Helper function to compute the new rect bounds adjusted for both the current |
| +// paint and all of the saved paints. Returns true on success and false on |
| +// failure. |
| +bool ComputeNewRectFromPaintBounds( |
|
ericrk
2015/12/08 21:34:26
nit: name is a bit weird, as we are producing pain
vmpstr
2015/12/09 23:53:41
Renamed.
|
| + const SkRect& rect, |
| + const SkPaint* paint, |
|
enne (OOO)
2015/12/08 23:27:24
Maybe calling this arg "current_paint" would also
vmpstr
2015/12/09 23:53:41
Done.
|
| + const std::vector<const SkPaint*>& saved_paints, |
| + SkRect* paint_bounds); |
| + |
| // This class is used for generating discardable images data (see DrawImage |
| // for the type of data it stores). It allows the client to query a particular |
| // rect and get back a list of DrawImages in that rect. |