diff options
author | vmpstr <vmpstr@chromium.org> | 2016-01-19 13:16:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-19 21:17:24 +0000 |
commit | 9dd810a16253140466189823394288ed60dfbb30 (patch) | |
tree | 36b5ebe5207d617c31272fec25449531af1ca844 /cc/playback/discardable_image_map.h | |
parent | 6941275bd07ed6c0b6b6a2b8efe0df5c1fe650b2 (diff) | |
download | chromium_src-9dd810a16253140466189823394288ed60dfbb30.zip chromium_src-9dd810a16253140466189823394288ed60dfbb30.tar.gz chromium_src-9dd810a16253140466189823394288ed60dfbb30.tar.bz2 |
cc: Add image decode control in the compositor.
This patch reworks ImageDecodeController and the surrounding
system to give control over image decodes to the compositor.
Perf note:
This is disabled on android, and should only affect desktop.
That being said, this patch changes the behavior with
respect to image decodes, so some perf changes are expected.
BUG=516751
R=enne, reed1
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1418573002
Cr-Commit-Position: refs/heads/master@{#370188}
Diffstat (limited to 'cc/playback/discardable_image_map.h')
-rw-r--r-- | cc/playback/discardable_image_map.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cc/playback/discardable_image_map.h b/cc/playback/discardable_image_map.h index f0535c1..1244c6c 100644 --- a/cc/playback/discardable_image_map.h +++ b/cc/playback/discardable_image_map.h @@ -20,6 +20,21 @@ 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 ComputeRectBoundsFromPaint(const SkRect& rect, + const SkPaint* current_paint, + 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. |