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

Unified Diff: ui/gfx/skia_util.h

Issue 1497543004: ui/gfx: Add MapRect and ExtractScale skia helper functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | ui/gfx/skia_util.cc » ('j') | ui/gfx/skia_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_util.h
diff --git a/ui/gfx/skia_util.h b/ui/gfx/skia_util.h
index 25c96d0370522e18bd9f8c2e771cc4ffd84917fc..fa6ba43dd4cf414da024bb63ebdc1febd690e893 100644
--- a/ui/gfx/skia_util.h
+++ b/ui/gfx/skia_util.h
@@ -88,6 +88,13 @@ GFX_EXPORT void ConvertSkiaToRGBA(const unsigned char* skia,
int pixel_width,
unsigned char* rgba);
+// Extracts the scale component from the matrix. Returns true if it succeeded
+// and false otherwise.
+GFX_EXPORT bool ExtractScale(const SkMatrix& matrix, SkSize* scale);
+
+// Applies the matrix to the rect and returns the resulting rect.
+GFX_EXPORT SkRect MapRect(const SkMatrix& matrix, const SkRect& src);
+
} // namespace gfx
#endif // UI_GFX_SKIA_UTIL_H_
« no previous file with comments | « no previous file | ui/gfx/skia_util.cc » ('j') | ui/gfx/skia_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698