Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: content/browser/compositor/browser_compositor_view_mac.mm

Issue 1373033004: aura: Defer OutputSurface creation until widget is available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/compositor/reflector_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "content/browser/compositor/image_transport_factory.h" 9 #include "content/browser/compositor/image_transport_factory.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 26 matching lines...) Expand all
37 gpu::FORCE_GL_FINISH_AFTER_COMPOSITING); 37 gpu::FORCE_GL_FINISH_AFTER_COMPOSITING);
38 } 38 }
39 39
40 } // namespace 40 } // namespace
41 41
42 BrowserCompositorMac::BrowserCompositorMac() 42 BrowserCompositorMac::BrowserCompositorMac()
43 : accelerated_widget_mac_( 43 : accelerated_widget_mac_(
44 new ui::AcceleratedWidgetMac(WidgetNeedsGLFinishWorkaround())), 44 new ui::AcceleratedWidgetMac(WidgetNeedsGLFinishWorkaround())),
45 compositor_(content::GetContextFactory(), 45 compositor_(content::GetContextFactory(),
46 ui::WindowResizeHelperMac::Get()->task_runner()) { 46 ui::WindowResizeHelperMac::Get()->task_runner()) {
47 compositor_.SetAcceleratedWidgetAndStartCompositor( 47 compositor_.SetAcceleratedWidget(
48 accelerated_widget_mac_->accelerated_widget()); 48 accelerated_widget_mac_->accelerated_widget());
49 compositor_.SetLocksWillTimeOut(false); 49 compositor_.SetLocksWillTimeOut(false);
50 Suspend(); 50 Suspend();
51 compositor_.AddObserver(this); 51 compositor_.AddObserver(this);
52 } 52 }
53 53
54 BrowserCompositorMac::~BrowserCompositorMac() { 54 BrowserCompositorMac::~BrowserCompositorMac() {
55 compositor_.RemoveObserver(this); 55 compositor_.RemoveObserver(this);
56 } 56 }
57 57
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 DCHECK_GT(g_placeholder_count, 0u); 115 DCHECK_GT(g_placeholder_count, 0u);
116 g_placeholder_count -= 1; 116 g_placeholder_count -= 1;
117 117
118 // If there are no placeholders allocated, destroy the recyclable 118 // If there are no placeholders allocated, destroy the recyclable
119 // BrowserCompositorMac. 119 // BrowserCompositorMac.
120 if (!g_placeholder_count) 120 if (!g_placeholder_count)
121 g_recyclable_browser_compositor.Get().reset(); 121 g_recyclable_browser_compositor.Get().reset();
122 } 122 }
123 123
124 } // namespace content 124 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/reflector_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698