The polarization measurement is an important tool to probe the prompt emission mechanism in gamma-ray bursts (GRBs). The synchrotron photons can be scattered by cold electrons in the outflow via Compton scattering (CS) processes. The observed polarization depends on both the photon energy and the viewing angle. With the typical bulk Lorentz factor Gamma similar to 200, photons with energy E > 10 MeV tend to have smaller polarization than photons with energy E < 1 MeV. At the right viewing angle, i.e., theta similar to Gamma(-1), the polarization achieves its maximal value, and the polarization angle changes 90 degrees relative to the initial polarization direction. Thus, the synchrotron radiation plus CS model can naturally explain the 90 degrees change of the polarization angle in GRB 100826A.