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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 217283006: Force software layer to redraw when it is resized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | 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_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 2329cfb33551c1a378fd370597d0741c2c630b9b..6834df1304fd78d550c95a983fd8c2f584b6b3c4 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -2277,7 +2277,12 @@ void RenderWidgetHostViewMac::LayoutLayers() {
// in the layer being anchored to the top-left. Set the layer's frame
// explicitly, since this is more reliable in practice.
if (software_layer_) {
- [software_layer_ setFrame:new_background_frame];
+ bool frame_changed = !CGRectEqualToRect(
+ new_background_frame, [software_layer_ frame]);
+ if (frame_changed) {
+ [software_layer_ setFrame:new_background_frame];
+ [software_layer_ setNeedsDisplay];
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698