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

Unified Diff: ui/compositor/layer.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 | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 2ace412653bb46e840399748d357830b02651fea..ad10a139671945e4f16e73f7f8b1c3b818a32cce 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -58,8 +58,6 @@ Layer::Layer()
layer_inverted_(false),
layer_mask_(NULL),
layer_mask_back_link_(NULL),
- zoom_x_offset_(0),
- zoom_y_offset_(0),
zoom_(1),
zoom_inset_(0),
delegate_(NULL),
@@ -85,8 +83,6 @@ Layer::Layer(LayerType type)
layer_inverted_(false),
layer_mask_(NULL),
layer_mask_back_link_(NULL),
- zoom_x_offset_(0),
- zoom_y_offset_(0),
zoom_(1),
zoom_inset_(0),
delegate_(NULL),
@@ -309,12 +305,7 @@ void Layer::SetMaskLayer(Layer* layer_mask) {
}
}
-void Layer::SetBackgroundZoom(float x_offset,
- float y_offset,
- float zoom,
- int inset) {
- zoom_x_offset_ = x_offset;
- zoom_y_offset_ = y_offset;
+void Layer::SetBackgroundZoom(float zoom, int inset) {
zoom_ = zoom;
zoom_inset_ = inset;
@@ -347,11 +338,10 @@ void Layer::SetLayerFilters() {
void Layer::SetLayerBackgroundFilters() {
WebKit::WebFilterOperations filters;
if (zoom_ != 1) {
- filters.append(WebKit::WebFilterOperation::createZoomFilter(
- WebKit::WebRect(zoom_x_offset_, zoom_y_offset_,
- (GetTargetBounds().width() / zoom_),
- (GetTargetBounds().height() / zoom_)),
- zoom_inset_));
+#ifdef NEW_ZOOM_FILTER // TODO(danakj): Remove this when WebKit rolls.
+ filters.append(WebKit::WebFilterOperation::createZoomFilter(zoom_,
+ zoom_inset_));
+#endif
}
if (background_blur_radius_) {
« no previous file with comments | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698