blob: b48923226a8593d28b1c2adfb3c29d35f9f8b6db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/output_surface.h"
#include "base/logging.h"
namespace cc {
OutputSurface::OutputSurface(
scoped_ptr<WebKit::WebGraphicsContext3D> context3d)
: client_(NULL),
context3d_(context3d.Pass()) {
}
OutputSurface::OutputSurface(
scoped_ptr<cc::SoftwareOutputDevice> software_device)
: client_(NULL),
software_device_(software_device.Pass()) {
}
OutputSurface::OutputSurface(
scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
scoped_ptr<cc::SoftwareOutputDevice> software_device)
: client_(NULL),
context3d_(context3d.Pass()),
software_device_(software_device.Pass()) {
}
OutputSurface::~OutputSurface() {
}
bool OutputSurface::BindToClient(
cc::OutputSurfaceClient* client) {
DCHECK(client);
client_ = client;
if (!context3d_)
return true;
return context3d_->makeContextCurrent();
}
void OutputSurface::SendFrameToParentCompositor(CompositorFrame*) {
NOTIMPLEMENTED();
}
} // namespace cc
|