histogram and window buffer