Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
SkNextID Class Reference

#include <SkNextID.h>

Static Public Member Functions

static uint32_t ImageID ()
 

Detailed Description

Definition at line 13 of file SkNextID.h.

Member Function Documentation

◆ ImageID()

uint32_t SkNextID::ImageID ( )
static

Shared between SkPixelRef's generationID and SkImage's uniqueID

Definition at line 19 of file SkPixelRef.cpp.

19 {
20 // We never set the low bit.... see SkPixelRef::genIDIsUnique().
21 static std::atomic<uint32_t> nextID{2};
22
23 uint32_t id;
24 do {
25 id = nextID.fetch_add(2, std::memory_order_relaxed);
26 } while (id == 0);
27 return id;
28}
const uintptr_t id

The documentation for this class was generated from the following files: