From 1f69274a90da1c81c305b23e16465c1b02ef8c06 Mon Sep 17 00:00:00 2001 From: Stephen Date: Sat, 22 Apr 2017 18:47:02 +0300 Subject: [PATCH] GLKit workaround #trivial (#54) * GLKit workaround: canClearContentsOfLayer now turned off for views with CAEAGLLayer * Nits fixed * Missed square bracket * Copyright added --- Source/ASDisplayNode.mm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index 535b95525..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 @@ -588,6 +600,11 @@ - (UIView *)_locked_viewToLoad || [_viewClass isSubclassOfClass:[UIVisualEffectView class]]) { self.opaque = NO; } + + // CAEAGLLayer + if([[view.layer class] isSubclassOfClass:[CAEAGLLayer class]]){ + _flags.canClearContentsOfLayer = NO; + } } return view;