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

Unified Diff: cc/output/filter_operations.cc

Issue 1998233002: cc: Implement and use FilterOperations::MapRectReverse for mapping backdrop bounding box. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test Created 4 years, 6 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/output/filter_operations.h ('k') | cc/output/filter_operations_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/filter_operations.cc
diff --git a/cc/output/filter_operations.cc b/cc/output/filter_operations.cc
index c4871f4827827744488d3fee0eff1c3f2649e85b..8263518640b8a30f291febaba75dd92684e215aa 100644
--- a/cc/output/filter_operations.cc
+++ b/cc/output/filter_operations.cc
@@ -73,6 +73,16 @@ gfx::Rect FilterOperations::MapRect(const gfx::Rect& rect,
accumulate_rect);
}
+gfx::Rect FilterOperations::MapRectReverse(const gfx::Rect& rect,
+ const SkMatrix& matrix) const {
+ auto accumulate_rect = [&matrix](const gfx::Rect& rect,
+ const FilterOperation& op) {
+ return op.MapRectReverse(rect, matrix);
+ };
+ return std::accumulate(operations_.rbegin(), operations_.rend(), rect,
+ accumulate_rect);
+}
+
void FilterOperations::GetOutsets(int* top,
int* right,
int* bottom,
« no previous file with comments | « cc/output/filter_operations.h ('k') | cc/output/filter_operations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698