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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 317633006: Move SnapToPhysicalPixelBoundary call to RWHVA::InternalSetBounds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | « no previous file | ui/compositor/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 6bec9f27ccacfd082660b5bf1708b6b7df56c727..8f2cd85c5c5eab8e4b7f2469904f0eb472d36d43 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -623,7 +623,6 @@ void RenderWidgetHostViewAura::SetBounds(const gfx::Rect& rect) {
}
}
- SnapToPhysicalPixelBoundary();
InternalSetBounds(gfx::Rect(relative_origin, rect.size()));
}
@@ -987,15 +986,14 @@ void RenderWidgetHostViewAura::SnapToPhysicalPixelBoundary() {
gfx::Vector2dF fudge = view_offset_snapped - view_offset;
fudge.Scale(1.0 / current_device_scale_factor_);
- gfx::Transform fudge_transform;
- fudge_transform.Translate(fudge.x(), fudge.y());
- GetLayer()->cc_layer()->SetTransform(fudge_transform);
+ GetLayer()->SetSubpixelPositionOffset(fudge);
}
void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) {
if (HasDisplayPropertyChanged(window_))
host_->InvalidateScreenInfo();
+ SnapToPhysicalPixelBoundary();
// Don't recursively call SetBounds if this bounds update is the result of
// a Window::SetBoundsInternal call.
if (!in_bounds_changed_)
« no previous file with comments | « no previous file | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698