Bug 1388309 P2 - expose GPUProcessManager::mDecodeVideoOnGPUProcess; draft
authorKaku Kuo <kaku@mozilla.com>
Mon, 14 Aug 2017 17:48:41 +0800
changeset 646259 ec886cd9ad807e0c63b616bd977753f3b5083a71
parent 646258 48d24a9f7169906af3f73b5e2a352f5bc9f28995
child 646260 531ae3ddde108c7c1fbe809784113b00166bdf7b
push id74045
push userbmo:kaku@mozilla.com
push dateTue, 15 Aug 2017 02:31:44 +0000
bugs1388309
milestone57.0a1
Bug 1388309 P2 - expose GPUProcessManager::mDecodeVideoOnGPUProcess; MozReview-Commit-ID: JjmgNyfapF0
dom/media/ipc/VideoDecoderManagerChild.h
gfx/ipc/GPUProcessManager.h
--- a/dom/media/ipc/VideoDecoderManagerChild.h
+++ b/dom/media/ipc/VideoDecoderManagerChild.h
@@ -47,19 +47,18 @@ public:
     return PVideoDecoderManagerChild::AllocUnsafeShmem(aSize, aShmType, aShmem);
   }
 
   // Can be called from any thread, dispatches the request to the IPDL thread internally
   // and will be ignored if the IPDL actor has been destroyed.
   bool DeallocShmem(mozilla::ipc::Shmem& aShmem) override;
 
   // Main thread only
-  // TODO: the default value is used to make this patch compilable, will be removed in next patch. 
   static void InitForContent(Endpoint<PVideoDecoderManagerChild>&& aVideoManager,
-                             const bool aDecodeVideoOnGPUProcess = true);
+                             const bool aDecodeVideoOnGPUProcess);
   static void Shutdown();
 
   // Run aTask (on the manager thread) when we next attempt to create a new manager
   // (even if creation fails). Intended to be called from ActorDestroy when we get
   // notified that the old manager is being destroyed.
   // Can only be called from the manager thread.
   void RunWhenRecreated(already_AddRefed<Runnable> aTask);
 
--- a/gfx/ipc/GPUProcessManager.h
+++ b/gfx/ipc/GPUProcessManager.h
@@ -177,16 +177,20 @@ public:
     return mGPUChild;
   }
 
   // Returns whether or not a GPU process was ever launched.
   bool AttemptedGPUProcess() const {
     return mNumProcessAttempts > 0;
   }
 
+  bool DecodeVideoOnGpuProcess() const {
+    return mDecodeVideoOnGpuProcess;
+  }
+
 private:
   // Called from our xpcom-shutdown observer.
   void OnXPCOMShutdown();
 
   bool CreateContentCompositorManager(base::ProcessId aOtherProcess,
                                       mozilla::ipc::Endpoint<PCompositorManagerChild>* aOutEndpoint);
   bool CreateContentImageBridge(base::ProcessId aOtherProcess,
                                 mozilla::ipc::Endpoint<PImageBridgeChild>* aOutEndpoint);