OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/compositor/browser_compositor_view_mac.h" | 5 #include "content/browser/compositor/browser_compositor_view_mac.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "content/browser/compositor/browser_compositor_ca_layer_tree_mac.h" | |
10 #include "content/browser/renderer_host/render_widget_resize_helper.h" | 9 #include "content/browser/renderer_host/render_widget_resize_helper.h" |
11 #include "content/public/browser/context_factory.h" | 10 #include "content/public/browser/context_factory.h" |
| 11 #include "ui/compositor/mac/accelerated_widget_mac.h" |
12 | 12 |
13 //////////////////////////////////////////////////////////////////////////////// | 13 //////////////////////////////////////////////////////////////////////////////// |
14 // BrowserCompositorMac | 14 // BrowserCompositorMac |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // The number of placeholder objects allocated. If this reaches zero, then | 20 // The number of placeholder objects allocated. If this reaches zero, then |
21 // the BrowserCompositorMac being held on to for recycling, | 21 // the BrowserCompositorMac being held on to for recycling, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 DCHECK_GT(g_placeholder_count, 0u); | 68 DCHECK_GT(g_placeholder_count, 0u); |
69 g_placeholder_count -= 1; | 69 g_placeholder_count -= 1; |
70 | 70 |
71 // If there are no placeholders allocated, destroy the recyclable | 71 // If there are no placeholders allocated, destroy the recyclable |
72 // BrowserCompositorMac. | 72 // BrowserCompositorMac. |
73 if (!g_placeholder_count) | 73 if (!g_placeholder_count) |
74 g_recyclable_browser_compositor.Get().reset(); | 74 g_recyclable_browser_compositor.Get().reset(); |
75 } | 75 } |
76 | 76 |
77 } // namespace content | 77 } // namespace content |
OLD | NEW |