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

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: add rect.h to renderpass.h 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..0680ff55ba70297d7fb06bdd3a9c0115b77446a7 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
piman 2013/03/13 06:01:14 It's a bit awkward to leave it like that, where th
danakj 2013/03/13 06:05:48 True. Ok, made it not read anything.
break;
}
}
@@ -51,7 +53,7 @@ bool ParamTraits<WebKit::WebFilterOperation>::Read(
WebKit::WebPoint dropShadowOffset;
WebKit::WebColor dropShadowColor;
SkScalar matrix[20];
- WebKit::WebRect zoomRect;
+ int zoomInset;
if (!ReadParam(m, iter, &type))
return false;
@@ -97,10 +99,15 @@ bool ParamTraits<WebKit::WebFilterOperation>::Read(
break;
}
case WebKit::WebFilterOperation::FilterTypeZoom:
- if (ReadParam(m, iter, &zoomRect) &&
- ReadParam(m, iter, &amount)) {
- r->setZoomRect(zoomRect);
+ if (ReadParam(m, iter, &amount) &&
+ ReadParam(m, iter, &zoomInset)) {
+#ifdef NEW_ZOOM_FILTER // TODO(danakj): Remove this when WebKit rolls.
r->setAmount(amount);
+ r->setZoomInset(zoomInset);
+#else
+ r->setAmount(0.f);
+ r->setZoomRect(WebKit::WebRect(0, 0, 0, 0));
+#endif
success = true;
}
break;
@@ -142,9 +149,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