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

Side by Side Diff: content/browser/compositor/browser_compositor_output_surface.cc

Issue 1903523004: The display can now create a Vulkan Renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vulkan_context_surface
Patch Set: Export VulkanRenderer Created 4 years, 8 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
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_output_surface.h" 5 #include "content/browser/compositor/browser_compositor_output_surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 cc::BeginFrameArgs::DefaultInterval())), 49 cc::BeginFrameArgs::DefaultInterval())),
50 reflector_(nullptr), 50 reflector_(nullptr),
51 use_begin_frame_scheduling_( 51 use_begin_frame_scheduling_(
52 base::CommandLine::ForCurrentProcess()->HasSwitch( 52 base::CommandLine::ForCurrentProcess()->HasSwitch(
53 cc::switches::kEnableBeginFrameScheduling)) { 53 cc::switches::kEnableBeginFrameScheduling)) {
54 Initialize(); 54 Initialize();
55 } 55 }
56 56
57 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( 57 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface(
58 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, 58 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider,
59 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager) 59 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
60 base::SingleThreadTaskRunner* task_runner)
60 : OutputSurface(nullptr, nullptr, vulkan_context_provider, nullptr), 61 : OutputSurface(nullptr, nullptr, vulkan_context_provider, nullptr),
61 vsync_manager_(vsync_manager), 62 vsync_manager_(vsync_manager),
63 synthetic_begin_frame_source_(new cc::SyntheticBeginFrameSource(
64 task_runner,
65 cc::BeginFrameArgs::DefaultInterval())),
62 reflector_(nullptr) { 66 reflector_(nullptr) {
63 Initialize(); 67 Initialize();
64 } 68 }
65 69
66 BrowserCompositorOutputSurface::~BrowserCompositorOutputSurface() { 70 BrowserCompositorOutputSurface::~BrowserCompositorOutputSurface() {
67 if (reflector_) 71 if (reflector_)
68 reflector_->DetachFromOutputSurface(); 72 reflector_->DetachFromOutputSurface();
69 DCHECK(!reflector_); 73 DCHECK(!reflector_);
70 if (!HasClient()) 74 if (!HasClient())
71 return; 75 return;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() { 146 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() {
143 return base::Closure(); 147 return base::Closure();
144 } 148 }
145 149
146 cc::OverlayCandidateValidator* 150 cc::OverlayCandidateValidator*
147 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const { 151 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const {
148 return overlay_candidate_validator_.get(); 152 return overlay_candidate_validator_.get();
149 } 153 }
150 154
151 } // namespace content 155 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698