GPUProcessListener.h (1232B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 #ifndef _include_mozilla_gfx_ipc_GPUProcessListener_h_ 7 #define _include_mozilla_gfx_ipc_GPUProcessListener_h_ 8 9 #include "nsISupportsImpl.h" 10 11 namespace mozilla { 12 namespace gfx { 13 14 class GPUProcessListener { 15 NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING 16 17 public: 18 virtual ~GPUProcessListener() = default; 19 20 // Called when the compositor has died and the rendering stack must be 21 // recreated. Before OnCompositorUnexpectedShutdown. 22 virtual void OnCompositorDestroyBackgrounded() {} 23 24 // Called when the compositor has died and the rendering stack must be 25 // recreated. After OnCompositorDestroyBackgrounded. 26 virtual void OnCompositorUnexpectedShutdown() {} 27 28 // Called when devices have been reset and tabs must throw away their 29 // layer managers. 30 virtual void OnCompositorDeviceReset() {} 31 }; 32 33 } // namespace gfx 34 } // namespace mozilla 35 36 #endif // _include_mozilla_gfx_ipc_GPUProcessListener_h_