It also comes from photosynthesis in the water. Diffusion requires exposing water to the air. However, diffusion is possible only at the water surface. It is most efficient when wind mixes the water. Diffusion is the process used by mechanical aerators.
Green plants require sunlight, water, carbon dioxide and minerals to make sugars and oxygen.
Algae are small, green plants. Some algae are single cell plants. They are responsible for the green color in ponds. Many animals use algae as their primary food supply. It is more important than diffusion.