Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3439)

Unified Diff: cc/playback/discardable_image_map.h

Issue 1418573002: cc: Add image decode control in the compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/playback/decoded_draw_image.h ('k') | cc/playback/discardable_image_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/discardable_image_map.h
diff --git a/cc/playback/discardable_image_map.h b/cc/playback/discardable_image_map.h
index f0535c1354c88a4a445f64382e189890d004b369..1244c6c1a7170dd2ac88eebab26a2532a50c9b70 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.
« no previous file with comments | « cc/playback/decoded_draw_image.h ('k') | cc/playback/discardable_image_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698