mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
account for pixel scale when checking against existing buffer storage size (#4103)
This commit is contained in:
parent
f808426ef4
commit
2d530daeca
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user