From 2d530daeca438ca24562d290616c0aec5ab76b88 Mon Sep 17 00:00:00 2001 From: xster Date: Wed, 13 Sep 2017 14:05:45 -0700 Subject: [PATCH] account for pixel scale when checking against existing buffer storage size (#4103) --- shell/platform/darwin/ios/ios_gl_context.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/platform/darwin/ios/ios_gl_context.mm b/shell/platform/darwin/ios/ios_gl_context.mm index dc018a0eb50..013b705561a 100644 --- a/shell/platform/darwin/ios/ios_gl_context.mm +++ b/shell/platform/darwin/ios/ios_gl_context.mm @@ -163,9 +163,10 @@ 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; - const GLint size_height = layer_size.height; + const GLint size_width = layer_size.width * contents_scale; + const GLint size_height = layer_size.height * contents_scale; if (size_width == storage_size_width_ && size_height == storage_size_height_) { // Nothing to since the stoage size is already consistent with the layer.