Skip to content

Commit

Permalink
ijkplayer-ios: fix layer is blank screen when create opengl in the ba…
Browse files Browse the repository at this point in the history
…ckground
  • Loading branch information
raymondzheng committed Nov 6, 2017
1 parent fc91fd8 commit 48d0877
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ - (BOOL)setupGL
if (_didSetupGL)
return YES;

if ([self isApplicationActive] == NO)
return NO;

CAEAGLLayer *eaglLayer = (CAEAGLLayer*) self.layer;
eaglLayer.opaque = YES;
eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
Expand Down Expand Up @@ -189,9 +186,6 @@ - (BOOL)setupGLOnce
if (_didSetupGL)
return YES;

if ([self isApplicationActive] == NO)
return NO;

if (![self tryLockGLActive])
return NO;

Expand Down Expand Up @@ -336,7 +330,10 @@ - (void) display_pixels: (IJKOverlay *) overlay {

- (void)display: (SDL_VoutOverlay *) overlay
{
if (![self setupGLOnce])
if (_didSetupGL == NO)
return;

if ([self isApplicationActive] == NO)
return;

if (![self tryLockGLActive]) {
Expand Down

0 comments on commit 48d0877

Please sign in to comment.