Visibility.h (1750B)
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 /** 8 * Declares visibility-related types. @Visibility is an enumeration of the 9 * possible visibility states of a frame. @OnNonvisible is an enumeration that 10 * allows callers to request a specific action when a frame transitions from 11 * visible to nonvisible. 12 */ 13 14 #ifndef mozilla_layout_generic_Visibility_h 15 #define mozilla_layout_generic_Visibility_h 16 17 namespace mozilla { 18 19 // Visibility states for frames. 20 enum class Visibility : uint8_t { 21 // Indicates that we're not tracking visibility for this frame. 22 Untracked, 23 24 // Indicates that the frame is probably nonvisible. Visible frames *may* be 25 // ApproximatelyNonVisible because approximate visibility is not updated 26 // synchronously. Some truly nonvisible frames may be marked 27 // ApproximatelyVisible instead if our heuristics lead us to think they may 28 // be visible soon. 29 ApproximatelyNonVisible, 30 31 // Indicates that the frame is either visible now or is likely to be visible 32 // soon according to our heuristics. As with ApproximatelyNonVisible , it's 33 // important to note that approximately visibility is not updated 34 // synchronously, so this information may be out of date. 35 ApproximatelyVisible, 36 }; 37 38 // Requested actions when frames transition to the nonvisible state. 39 enum class OnNonvisible : uint8_t { 40 DiscardImages // Discard images associated with the frame. 41 }; 42 43 } // namespace mozilla 44 45 #endif // mozilla_layout_generic_Visibility_h