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

Side by Side Diff: blimp/client/app/compositor/browser_compositor.cc

Issue 2337913003: Fork cc::OutputSurface into cc::CompositorFrameSink. (Closed)
Patch Set: cfsfork: android-vulkan Created 4 years, 3 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 | « android_webview/browser/render_thread_manager.cc ('k') | blimp/client/core/compositor/BUILD.gn » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/client/app/compositor/browser_compositor.h" 5 #include "blimp/client/app/compositor/browser_compositor.h"
6 6
7 #include "blimp/client/public/compositor/compositor_dependencies.h" 7 #include "blimp/client/public/compositor/compositor_dependencies.h"
8 #include "blimp/client/support/compositor/blimp_context_provider.h" 8 #include "blimp/client/support/compositor/blimp_context_provider.h"
9 #include "cc/output/context_provider.h" 9 #include "cc/output/context_provider.h"
10 10
11 namespace blimp { 11 namespace blimp {
12 namespace client { 12 namespace client {
13 13
14 BrowserCompositor::BrowserCompositor( 14 BrowserCompositor::BrowserCompositor(
15 CompositorDependencies* compositor_dependencies) 15 CompositorDependencies* compositor_dependencies)
16 : BlimpEmbedderCompositor(compositor_dependencies) {} 16 : BlimpEmbedderCompositor(compositor_dependencies) {}
17 17
18 BrowserCompositor::~BrowserCompositor() = default; 18 BrowserCompositor::~BrowserCompositor() = default;
19 19
20 void BrowserCompositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { 20 void BrowserCompositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
21 scoped_refptr<cc::ContextProvider> provider; 21 scoped_refptr<cc::ContextProvider> provider;
22 22
23 if (widget != gfx::kNullAcceleratedWidget) { 23 if (widget != gfx::kNullAcceleratedWidget) {
24 provider = BlimpContextProvider::Create( 24 provider = BlimpContextProvider::Create(
25 widget, compositor_dependencies()->GetGpuMemoryBufferManager()); 25 widget, compositor_dependencies()->GetGpuMemoryBufferManager());
26 } 26 }
27 27
28 SetContextProvider(provider); 28 SetContextProvider(std::move(provider));
29 } 29 }
30 30
31 void BrowserCompositor::DidCompleteSwapBuffers() { 31 void BrowserCompositor::DidCompleteSwapBuffers() {
32 if (!did_complete_swap_buffers_.is_null()) { 32 if (!did_complete_swap_buffers_.is_null()) {
33 did_complete_swap_buffers_.Run(); 33 did_complete_swap_buffers_.Run();
34 } 34 }
35 } 35 }
36 36
37 } // namespace client 37 } // namespace client
38 } // namespace blimp 38 } // namespace blimp
OLDNEW
« no previous file with comments | « android_webview/browser/render_thread_manager.cc ('k') | blimp/client/core/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698