From 79b9bdbbf4d3193620be35e3ea3e1a162b553627 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 4 Oct 2017 17:42:46 -0700 Subject: [PATCH] Revert "Use iOS scale when computing render buffer size (#4171)" (flutter/engine#4175) This reverts commit 1a7ca91e3938abd5720b3553dfb2045a6b805a3b. Clear regression to the flutter_gallery_ios__transition_perf benchmarks: * average_frame_build_time_millis: 1.4x * missed_frame_build_budget_count: 1.2x No regression seen for other iOS benchmarks (e.g. scrolling). --- .../flutter/shell/platform/darwin/ios/ios_gl_context.mm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm b/engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm index e9263141a0..dc018a0eb5 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm @@ -163,16 +163,14 @@ bool IOSGLContext::PresentRenderBuffer() const { bool IOSGLContext::UpdateStorageSizeIfNecessary() { const CGSize layer_size = [layer_.get() bounds].size; - const CGFloat contents_scale = layer_.get().contentsScale; - const GLint size_width = layer_size.width * contents_scale; - const GLint size_height = layer_size.height * contents_scale; + + const GLint size_width = layer_size.width; + const GLint size_height = layer_size.height; if (size_width == storage_size_width_ && size_height == storage_size_height_) { // Nothing to since the stoage size is already consistent with the layer. return true; } - TRACE_EVENT0("flutter", "Updating render buffer storage size"); - FXL_DLOG(INFO) << "Updating render buffer storage size."; if (![EAGLContext setCurrentContext:context_]) { return false;