Browse Source

modfy: 好像不会😂,补充提交

Melody 5 years ago
parent
commit
5e7af5575f
1 changed files with 5 additions and 13 deletions
  1. 5 13
      SuperShow/OJAGPUImageDecoder/OJADecoder.swift

+ 5 - 13
SuperShow/OJAGPUImageDecoder/OJADecoder.swift

@@ -73,10 +73,6 @@ class OJADecoder: NSObject {
 
         //初始化的时候要设置一次filter链,因为可能最开始currentInputArray和lastInputArray都是0
         self.lastInputArray = self.currentInputArray()
-        /// 如果有前景添加前景素材
-        if let fgInput = fgMovieInput {
-            self.lastInputArray.append(fgInput)
-        }
         self.buildChain()
     }
     
@@ -87,10 +83,6 @@ class OJADecoder: NSObject {
         
         //初始化的时候要设置一次filter链,因为可能最开始currentInputArray和lastInputArray都是0
         self.lastInputArray = self.currentInputArray()
-        /// 如果有前景添加前景素材
-        if let fgInput = fgMovieInput {
-            self.lastInputArray.append(fgInput)
-        }
         self.buildChain()
     }
     
@@ -104,10 +96,7 @@ class OJADecoder: NSObject {
         
         //初始化的时候要设置一次filter链,因为可能最开始currentInputArray和lastInputArray都是0
         self.lastInputArray = self.currentInputArray()
-        /// 如果有前景添加前景素材
-        if let fgInput = fgMovieInput {
-            self.lastInputArray.append(fgInput)
-        }
+
         self.buildChain()
     }
     
@@ -147,7 +136,10 @@ private extension OJADecoder {
             self.backgroundColor.getRed(&cr, green: &cg, blue: &cb, alpha: &ca)
             blendFilter.setBackgroundColorRed(GLfloat(cr), green: GLfloat(cg), blue: GLfloat(cb), alpha: GLfloat(ca))
             var tempArray = lastInputArray
-            
+            /// 如果有前景添加前景素材
+            if let fgInput = fgMovieInput {
+                self.lastInputArray.append(fgInput)
+            }
             if self.templateDataModel.blend == 1 {
                 tempArray = tempArray.sorted(by: { (input1, input2) -> Bool in
                     return input1.zIndex < input2.zIndex