Use only one ui::Compositor per Chrome window on Mac
commit1b05abf60e7785d5a85c9bf13757f6daef3767ee
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Sat, 28 Jun 2014 00:14:21 +0000 (28 00:14 +0000)
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Sat, 28 Jun 2014 00:14:21 +0000 (28 00:14 +0000)
tree45571932d5cd3283d3d69b50d0e853425471bfb7
parent46beff91bc84f8868188c6ba960bb6344eb82a7d
Use only one ui::Compositor per Chrome window on Mac

Create a BrowserCompositorViewMac C++ class which is used to manage
and recycle a BrowserCompositorViewCocoa Objective C class (in a similar
manner to RenderWidgetHostViewMac and RenderWidgetHostViewCocoa).

There are two classes of BrowserCompositorViewMac -- ones that have a
BrowserCompositorViewCocoa, used by visible windows, and ones that
do not, which are used by backgrounded tabs. When there are any of the
second type of BrowserCompositorViewMac in existence, keep around at
most one spare BrowserCompositorViewCocoa to be recycled. This has
the effect of avoiding creating and destroying ui::Compositors during
tab switch.

Move the persistent BrowserCompositorViewCocoa functionality to a
separate file for readability.

BUG=314190

Review URL: https://codereview.chromium.org/349443006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280460 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/compositor/browser_compositor_view_mac.h
content/browser/compositor/browser_compositor_view_mac.mm
content/browser/compositor/browser_compositor_view_private_mac.h [new file with mode: 0644]
content/browser/compositor/browser_compositor_view_private_mac.mm [copied from content/browser/compositor/browser_compositor_view_mac.mm with 73% similarity]
content/browser/renderer_host/render_widget_host_view_mac.h
content/browser/renderer_host/render_widget_host_view_mac.mm
content/content_browser.gypi
ui/compositor/compositor.cc