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

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2002303002: Consolidate OutputSurface constructors into GL vs Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: outputsurface-constructors: rebase-and-fixcrash Created 4 years, 7 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 | « content/renderer/render_widget.cc ('k') | no next file » | 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 "ui/compositor/test/in_process_context_factory.h" 5 #include "ui/compositor/test/in_process_context_factory.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 }; 42 };
43 43
44 // An OutputSurface implementation that directly draws and swaps to an actual 44 // An OutputSurface implementation that directly draws and swaps to an actual
45 // GL surface. 45 // GL surface.
46 class DirectOutputSurface : public cc::OutputSurface { 46 class DirectOutputSurface : public cc::OutputSurface {
47 public: 47 public:
48 DirectOutputSurface( 48 DirectOutputSurface(
49 const scoped_refptr<cc::ContextProvider>& context_provider, 49 const scoped_refptr<cc::ContextProvider>& context_provider,
50 const scoped_refptr<cc::ContextProvider>& worker_context_provider, 50 const scoped_refptr<cc::ContextProvider>& worker_context_provider,
51 std::unique_ptr<cc::BeginFrameSource> begin_frame_source) 51 std::unique_ptr<cc::BeginFrameSource> begin_frame_source)
52 : cc::OutputSurface(context_provider, worker_context_provider), 52 : cc::OutputSurface(context_provider, worker_context_provider, nullptr),
53 begin_frame_source_(std::move(begin_frame_source)), 53 begin_frame_source_(std::move(begin_frame_source)),
54 weak_ptr_factory_(this) {} 54 weak_ptr_factory_(this) {}
55 55
56 ~DirectOutputSurface() override {} 56 ~DirectOutputSurface() override {}
57 57
58 // cc::OutputSurface implementation 58 // cc::OutputSurface implementation
59 bool BindToClient(cc::OutputSurfaceClient* client) override { 59 bool BindToClient(cc::OutputSurfaceClient* client) override {
60 if (!OutputSurface::BindToClient(client)) 60 if (!OutputSurface::BindToClient(client))
61 return false; 61 return false;
62 62
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, 259 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
260 const gfx::Size& size) { 260 const gfx::Size& size) {
261 if (!per_compositor_data_.count(compositor)) 261 if (!per_compositor_data_.count(compositor))
262 return; 262 return;
263 per_compositor_data_[compositor]->display()->Resize(size); 263 per_compositor_data_[compositor]->display()->Resize(size);
264 } 264 }
265 265
266 } // namespace ui 266 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698