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

Side by Side Diff: cc/output_surface.cc

Issue 12041062: Have a common implementation of cc::OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « cc/output_surface.h ('k') | cc/resource_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 "cc/output_surface.h"
6
7 #include "base/logging.h"
8
9 namespace cc {
10
11 OutputSurface::OutputSurface(
12 scoped_ptr<WebKit::WebGraphicsContext3D> context3d)
13 : client_(NULL),
14 context3d_(context3d.Pass()) {
15 }
16
17 OutputSurface::OutputSurface(
18 scoped_ptr<cc::SoftwareOutputDevice> software_device)
19 : client_(NULL),
20 software_device_(software_device.Pass()) {
21 }
22
23 OutputSurface::OutputSurface(
24 scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
25 scoped_ptr<cc::SoftwareOutputDevice> software_device)
26 : client_(NULL),
27 context3d_(context3d.Pass()),
28 software_device_(software_device.Pass()) {
29 }
30
31 OutputSurface::~OutputSurface() {
32 }
33
34 bool OutputSurface::BindToClient(
35 cc::OutputSurfaceClient* client) {
36 DCHECK(client);
37 client_ = client;
38 if (!context3d_)
39 return true;
40 return context3d_->makeContextCurrent();
41 }
42
43 void OutputSurface::SendFrameToParentCompositor(CompositorFrame*) {
44 NOTIMPLEMENTED();
45 }
46
47 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output_surface.h ('k') | cc/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698