Skip to content

Commit

Permalink
GLKit workaround #trivial (#54)
Browse files Browse the repository at this point in the history
* GLKit workaround:
canClearContentsOfLayer now turned off for views with CAEAGLLayer

* Nits fixed

* Missed square bracket

* Copyright added
  • Loading branch information
stephenkopylov authored and nguyenhuy committed Apr 22, 2017
1 parent 23e84f2 commit 1f69274
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Source/ASDisplayNode.mm
Original file line number Diff line number Diff line change
@@ -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 <AsyncDisplayKit/ASDisplayNodeInternal.h>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1f69274

Please sign in to comment.