RenderingPhase.h (1721B)
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 7 #ifndef MOZILLA_RENDERINGPHASE_H_ 8 #define MOZILLA_RENDERINGPHASE_H_ 9 10 #include <cstdint> 11 12 #include "mozilla/EnumSet.h" 13 14 namespace mozilla { 15 16 // Steps in https://html.spec.whatwg.org/#update-the-rendering 17 // When updating this, please update sRenderingPhaseNames in nsRefreshDriver. 18 enum class RenderingPhase : uint8_t { 19 // TODO: Reveal docs. 20 FlushAutoFocusCandidates = 0, 21 ResizeSteps, 22 ScrollSteps, 23 EvaluateMediaQueriesAndReportChanges, 24 UpdateAnimationsAndSendEvents, 25 FullscreenSteps, 26 // TODO: Context lost steps? 27 AnimationFrameCallbacks, 28 Layout, 29 ViewTransitionOperations, 30 UpdateIntersectionObservations, 31 // TODO: Record rendering time 32 // TODO: Mark paint timing 33 Paint, 34 // TODO: Process top layer removals. 35 Count, 36 }; 37 38 using RenderingPhases = EnumSet<RenderingPhase, uint16_t>; 39 inline constexpr RenderingPhases AllRenderingPhases() { 40 return { 41 RenderingPhase::FlushAutoFocusCandidates, 42 RenderingPhase::ResizeSteps, 43 RenderingPhase::ScrollSteps, 44 RenderingPhase::EvaluateMediaQueriesAndReportChanges, 45 RenderingPhase::UpdateAnimationsAndSendEvents, 46 RenderingPhase::FullscreenSteps, 47 RenderingPhase::AnimationFrameCallbacks, 48 RenderingPhase::Layout, 49 RenderingPhase::ViewTransitionOperations, 50 RenderingPhase::UpdateIntersectionObservations, 51 RenderingPhase::Paint, 52 }; 53 } 54 55 } // namespace mozilla 56 57 #endif