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

Side by Side Diff: blimp/client/feature/compositor/blimp_output_surface.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/feature/compositor/blimp_output_surface.h" 5 #include "blimp/client/feature/compositor/blimp_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 #include "gpu/command_buffer/client/context_support.h" 10 #include "gpu/command_buffer/client/context_support.h"
11 11
12 namespace blimp { 12 namespace blimp {
13 namespace client { 13 namespace client {
14 14
15 BlimpOutputSurface::BlimpOutputSurface( 15 BlimpOutputSurface::BlimpOutputSurface(
16 const scoped_refptr<cc::ContextProvider>& context_provider) 16 scoped_refptr<cc::ContextProvider> context_provider)
17 : cc::OutputSurface(context_provider) { 17 : cc::OutputSurface(std::move(context_provider), nullptr, nullptr) {}
18 }
19 18
20 BlimpOutputSurface::~BlimpOutputSurface() {} 19 BlimpOutputSurface::~BlimpOutputSurface() {}
21 20
22 void BlimpOutputSurface::SwapBuffers(cc::CompositorFrame* frame) { 21 void BlimpOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
23 // See cc::OutputSurface::SwapBuffers() comment for details. 22 // See cc::OutputSurface::SwapBuffers() comment for details.
24 context_provider_->ContextSupport()->Swap(); 23 context_provider_->ContextSupport()->Swap();
25 client_->DidSwapBuffers(); 24 client_->DidSwapBuffers();
26 cc::OutputSurface::PostSwapBuffersComplete(); 25 cc::OutputSurface::PostSwapBuffersComplete();
27 } 26 }
28 27
29 } // namespace client 28 } // namespace client
30 } // namespace blimp 29 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/feature/compositor/blimp_output_surface.h ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698