On two geometric realizations of an affine Hecke algebra