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

Side by Side Diff: blimp/client/compositor/blimp_output_surface.cc

Issue 1295243003: Initial commit of the blimp/ folder and target (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned it up, addressed nyquist@ nits Created 5 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "blimp/client/compositor/blimp_output_surface.h"
6
7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h"
9 #include "cc/output/output_surface_client.h"
10 #include "gpu/command_buffer/client/context_support.h"
11
12 namespace blimp {
13
14 BlimpOutputSurface::BlimpOutputSurface(
15 const scoped_refptr<cc::ContextProvider>& context_provider)
16 : cc::OutputSurface(context_provider), weak_factory_(this) {}
17
18 BlimpOutputSurface::~BlimpOutputSurface() {}
19
20 void BlimpOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
21 context_provider_->ContextSupport()->Swap();
22 client_->DidSwapBuffers();
23
24 base::MessageLoop::current()->task_runner()->PostTask(
25 FROM_HERE, base::Bind(&BlimpOutputSurface::OnSwapBuffersComplete,
26 weak_factory_.GetWeakPtr()));
27 }
28
29 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698