It's called a flood fill, and it's what you see in paint programs. It's very fast. Pseudocode:
declare visited list //the results you want
declare unvisited list
add current element (where red dot is) to unvisited list
while unvisited list not empty
get current element from workingunvisited list
add current element to filledvisited list
for all (8) neighbours of current element
if neighbour is green
if neighbour is not in visited list //be sure not to process same ones again!
add neighbour to unvisited list
remove current element from unvisited list
The way I'd do this is using a set (or hashtable if set not available); as these structures don't allow duplicates, you don't have to do the if neighbour is not in visited list in your own code.