Cooling rate sets grain size: magma trapped at depth cools over thousands to millions of years and grows large crystals, giving a coarse-grained texture, while magma erupted at the surface solidifies almost instantly and gives a very fine-grained or glassy texture.
Evidence support: Supported by the cited evidence one source
Evidence: U.S. Geological Survey n.d. Primary authority