Просмотр исходного кода

Backend: Move trackTimestamp to parent class (#30714)

Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
Samuel Rigaud 11 месяцев назад
Родитель
Сommit
984b00dd86

+ 8 - 0
src/renderers/common/Backend.js

@@ -68,6 +68,14 @@ class Backend {
 			'compute': null
 		};
 
+		/**
+		 * Whether to track timestamps with a Timestamp Query API or not.
+		 *
+		 * @type {boolean}
+		 * @default false
+		 */
+		this.trackTimestamp = ( parameters.trackTimestamp === true );
+
 	}
 
 	/**

+ 0 - 8
src/renderers/webgl-fallback/WebGLBackend.js

@@ -167,14 +167,6 @@ class WebGLBackend extends Backend {
 		*/
 		this.parallel = null;
 
-		/**
-		 * Whether to track timestamps with a Timestamp Query API or not.
-		 *
-		 * @type {boolean}
-		 * @default false
-		 */
-		this.trackTimestamp = ( parameters.trackTimestamp === true );
-
 		/**
 		 * A reference to the current render context.
 		 *

+ 0 - 8
src/renderers/webgpu/WebGPUBackend.js

@@ -66,14 +66,6 @@ class WebGPUBackend extends Backend {
 
 		this.parameters.requiredLimits = ( parameters.requiredLimits === undefined ) ? {} : parameters.requiredLimits;
 
-		/**
-		 * Whether to track timestamps with a Timestamp Query API or not.
-		 *
-		 * @type {boolean}
-		 * @default false
-		 */
-		this.trackTimestamp = ( parameters.trackTimestamp === true );
-
 		/**
 		 * A reference to the device.
 		 *

粤ICP备19079148号