I tired with the offscreen mode and here are the problems I found:
- [x] <del>The `data` of `paint` event is empty when loading simple local pages.</del>
- [x] The size of `data` is wrong, current implement uses the size of pointer (`sizeof(bitmap_pixels)`).
- [x] Crashes when opening devtools for offscreen window.
- [x] We should probably show a dummy view indicating it is offscreen instead of provide NULL.
- [x] The offscreen window is affecting the rendering of other windows. Try running `./script/test.py -g offscreen` and then refreshing the window.

/cc @gerhardberger @brenca

atom/browser/api/atom_api_web_contents.cc
gfx::Rect rect;
  base::Callback<void(const gfx::Image&)> callback;
  if (!(args->Length() == 1 && args->GetNext(&callback)) &&
      !(args->Length() == 2 && args->GetNext(&rect)
                            && args->GetNext(&callback))) {
    args->ThrowError();
    return;
  }
  const auto view = web_contents()->GetRenderWidgetHostView();
  const auto host = view ? view->GetRenderWidgetHost() : nullptr;
  if (!view || !host) {
    callback.Run(gfx::Image());
    return;
  }
  
  const gfx::Size view_size = rect.IsEmpty() ? view->GetViewBounds().size() :
                                               rect.size();
  
  
  
  gfx::Size bitmap_size = view_size;
  const gfx::NativeView native_view = view->GetNativeView();
  const float scale =
      display::Screen::GetScreen()->GetDisplayNearestWindow(native_view)
      .device_scale_factor();
  if (scale > 1.0f)