Although the majority of AC offline converters and switching converters that run from hazardous voltage, include galvanic isolation for safety, there are many applications where non-isolated circuits can be used. Where mechanical isolation protects the user and service personnel from contact with hazardous voltages, or for where both input and output voltage are on the primary side of isolated converters, the buck regulator and buckboost regulators are often more efficient, use less PCB area and cost less to implement than flyback regulators. 

REFERENCED IMAGES:

Figure 1:

Figure 2:

Figure 3:

Figure 4:

Figure 5: