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

Unified Diff: cc/output/gl_renderer.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_unittest.cc ('k') | cc/output/software_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 1f52d925d76ef55829ae7656d813c6c5e548eef3..5190e955130c73fb2af387b345e22efbaa67df8c 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -800,9 +800,16 @@ gfx::Rect GLRenderer::GetBackdropBoundingBoxForRenderPassQuad(
contents_device_transform, scaled_region.BoundingBox()));
if (ShouldApplyBackgroundFilters(quad)) {
- int top, right, bottom, left;
- quad->background_filters.GetOutsets(&top, &right, &bottom, &left);
- backdrop_rect.Inset(-left, -top, -right, -bottom);
+ SkMatrix matrix;
+ matrix.setScale(quad->filters_scale.x(), quad->filters_scale.y());
+ if (FlippedFramebuffer(frame)) {
+ // TODO(jbroman): This probably isn't the right way to account for this.
+ // Probably some combination of frame->projection_matrix,
+ // frame->window_matrix and contents_device_transform?
+ matrix.postScale(1, -1);
+ }
+ backdrop_rect =
+ quad->background_filters.MapRectReverse(backdrop_rect, matrix);
}
if (!backdrop_rect.IsEmpty() && use_aa) {
« no previous file with comments | « cc/output/filter_operations_unittest.cc ('k') | cc/output/software_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698