From 617bc7d24ddf225ef28065e00659674dd5ed846e Mon Sep 17 00:00:00 2001 From: Stepan Kopylov Date: Fri, 21 Apr 2017 18:36:26 +0300 Subject: [PATCH 1/4] GLKit workaround: canClearContentsOfLayer now turned off for views with CAEAGLLayer --- Source/ASDisplayNode.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index 535b95525..07dbf5351 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -588,6 +588,11 @@ - (UIView *)_locked_viewToLoad || [_viewClass isSubclassOfClass:[UIVisualEffectView class]]) { self.opaque = NO; } + + // CAEAGLLayer + if([view.layer.class isSubclassOfClass:[CAEAGLLayer class]]){ + _flags.canClearContentsOfLayer = NO; + } } return view; From 656cd99cc444d6c66b64244ba7200c1026f3bbb3 Mon Sep 17 00:00:00 2001 From: Stepan Kopylov Date: Fri, 21 Apr 2017 19:05:20 +0300 Subject: [PATCH 2/4] Nits fixed --- Source/ASDisplayNode.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index 07dbf5351..257ddf4f8 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -590,8 +590,8 @@ - (UIView *)_locked_viewToLoad } // CAEAGLLayer - if([view.layer.class isSubclassOfClass:[CAEAGLLayer class]]){ - _flags.canClearContentsOfLayer = NO; + if([view.layer class] isSubclassOfClass:[CAEAGLLayer class]]){ + _flags.canClearContentsOfLayer = NO; } } From f86d63de46b6eb17f55bc73bcb1e2f39180de335 Mon Sep 17 00:00:00 2001 From: Stepan Kopylov Date: Sat, 22 Apr 2017 11:38:06 +0300 Subject: [PATCH 3/4] Missed square bracket --- Source/ASDisplayNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index 257ddf4f8..f4582d561 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -590,7 +590,7 @@ - (UIView *)_locked_viewToLoad } // CAEAGLLayer - if([view.layer class] isSubclassOfClass:[CAEAGLLayer class]]){ + if([[view.layer class] isSubclassOfClass:[CAEAGLLayer class]]){ _flags.canClearContentsOfLayer = NO; } } From 72dfb2d4d0a5cd5a04224cb82f67d38913db044b Mon Sep 17 00:00:00 2001 From: Stepan Kopylov Date: Sat, 22 Apr 2017 17:31:14 +0300 Subject: [PATCH 4/4] Copyright added --- Source/ASDisplayNode.mm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index f4582d561..b34552aeb 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -1,11 +1,23 @@ // // ASDisplayNode.mm -// AsyncDisplayKit +// Texture // // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. +// Modifications to this file made after 4/13/2017 are: Copyright (c) 2017-present, +// Pinterest, Inc. Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // #import