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

Unified Diff: content/common/cc_messages.cc

Issue 12816002: Make zoom filter independent of the layer size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/render_surface_filters.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cc_messages.cc
diff --git a/content/common/cc_messages.cc b/content/common/cc_messages.cc
index 799fa972fa21e987bb458bb347cf381b45111693..f4cf17b24d23d2d8509dfc7202aa274ada0922ad 100644
--- a/content/common/cc_messages.cc
+++ b/content/common/cc_messages.cc
@@ -38,8 +38,10 @@ void ParamTraits<WebKit::WebFilterOperation>::Write(
WriteParam(m, p.matrix()[i]);
break;
case WebKit::WebFilterOperation::FilterTypeZoom:
- WriteParam(m, p.zoomRect());
+#ifdef NEW_ZOOM_FILTER // TODO(danakj): Remove this when WebKit rolls.
WriteParam(m, p.amount());
+ WriteParam(m, p.zoomInset());
+#endif
break;
}
}
@@ -51,7 +53,9 @@ bool ParamTraits<WebKit::WebFilterOperation>::Read(
WebKit::WebPoint dropShadowOffset;
WebKit::WebColor dropShadowColor;
SkScalar matrix[20];
- WebKit::WebRect zoomRect;
+#ifdef NEW_ZOOM_FILTER // TODO(danakj): Remove this when WebKit rolls.
+ int zoom_inset;
+#endif
if (!ReadParam(m, iter, &type))
return false;
@@ -97,12 +101,16 @@ bool ParamTraits<WebKit::WebFilterOperation>::Read(
break;
}
case WebKit::WebFilterOperation::FilterTypeZoom:
- if (ReadParam(m, iter, &zoomRect) &&
- ReadParam(m, iter, &amount)) {
- r->setZoomRect(zoomRect);
+#ifdef NEW_ZOOM_FILTER // TODO(danakj): Remove this when WebKit rolls.
+ if (ReadParam(m, iter, &amount) &&
+ ReadParam(m, iter, &zoom_inset) &&
+ amount >= 0.f &&
+ zoom_inset >= 0) {
r->setAmount(amount);
+ r->setZoomInset(zoom_inset);
success = true;
}
+#endif
break;
}
return success;
@@ -142,9 +150,11 @@ void ParamTraits<WebKit::WebFilterOperation>::Log(
}
break;
case WebKit::WebFilterOperation::FilterTypeZoom:
- LogParam(p.zoomRect(), l);
- l->append(", ");
+#ifdef NEW_ZOOM_FILTER // TODO(danakj): Remove this when WebKit rolls.
LogParam(p.amount(), l);
+ l->append(", ");
+ LogParam(p.zoomInset(), l);
+#endif
break;
}
l->append(")");
« no previous file with comments | « cc/render_surface_filters.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698