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

Unified Diff: trunk/src/content/browser/compositor/browser_compositor_view_private_mac.mm

Issue 387863004: Revert 281866 "Mac ÜC: Make resize smooth" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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
Index: trunk/src/content/browser/compositor/browser_compositor_view_private_mac.mm
===================================================================
--- trunk/src/content/browser/compositor/browser_compositor_view_private_mac.mm (revision 282673)
+++ trunk/src/content/browser/compositor/browser_compositor_view_private_mac.mm (working copy)
@@ -75,15 +75,6 @@
compositor_->ScheduleFullRedraw();
}
-- (bool)hasFrameWithSizeInDIP:(gfx::Size)desiredSizeInDIP {
- gfx::Size layerSize;
- if (accelerated_layer_)
- layerSize = gfx::Rect([accelerated_layer_ bounds]).size();
- if (software_layer_)
- layerSize = gfx::Rect([software_layer_ bounds]).size();
- return layerSize == desiredSizeInDIP;
-}
-
- (ui::Compositor*)compositor {
return compositor_.get();
}
@@ -98,7 +89,6 @@
accelerated_latency_info_.insert(accelerated_latency_info_.end(),
latency_info.begin(), latency_info.end());
- // Disable the fade-in animation as the layer is added, removed, or resized.
ScopedCAActionDisabler disabler;
// If there is already an accelerated layer, but it has the wrong scale
@@ -113,6 +103,8 @@
// If there is not a layer for accelerated frames, create one.
if (!accelerated_layer_) {
+ // Disable the fade-in animation as the layer is added.
+ ScopedCAActionDisabler disabler;
scoped_refptr<content::CompositingIOSurfaceMac> iosurface =
content::CompositingIOSurfaceMac::Create();
accelerated_layer_.reset([[CompositingIOSurfaceLayer alloc]
@@ -143,8 +135,7 @@
bool bounds_changed = !CGRectEqualToRect(
new_layer_bounds, [accelerated_layer_ bounds]);
[accelerated_layer_ setBounds:new_layer_bounds];
- if (bounds_changed ||
- (client_ && client_->BrowserCompositorShouldDrawImmediately())) {
+ if (bounds_changed) {
[accelerated_layer_ setNeedsDisplay];
[accelerated_layer_ displayIfNeeded];
}
@@ -152,6 +143,7 @@
// If there was a software layer or an old accelerated layer, remove it.
// Disable the fade-out animation as the layer is removed.
{
+ ScopedCAActionDisabler disabler;
[software_layer_ removeFromSuperlayer];
software_layer_.reset();
[old_accelerated_layer resetClient];

Powered by Google App Engine
This is Rietveld 408576698