Are taxes on L-T capital gains determined by working up through the brackets (15% - 20%) or at one rate determined by the Taxable Income threshold?

For example, if your Taxable Income is just over a threshold, do you pay the higher rate just on gains over that threshold amount?