| Index: cc/test/fake_output_surface.cc
|
| diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c8e72ee2b1a35c5e82e82a635c22c13a0c0e5cfb
|
| --- /dev/null
|
| +++ b/cc/test/fake_output_surface.cc
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2012 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/test/fake_output_surface.h"
|
| +
|
| +namespace cc {
|
| +
|
| +FakeOutputSurface::FakeOutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
|
| + context3d_ = context3d.Pass();
|
| +}
|
| +
|
| +FakeOutputSurface::FakeOutputSurface(scoped_ptr<SoftwareOutputDevice> softwareDevice) {
|
| + software_device_ = softwareDevice.Pass();
|
| +}
|
| +
|
| +FakeOutputSurface::~FakeOutputSurface() {}
|
| +
|
| +bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
|
| + if (!context3d_)
|
| + return true;
|
| + DCHECK(client);
|
| + if (!context3d_->makeContextCurrent())
|
| + return false;
|
| + client_ = client;
|
| + return true;
|
| +}
|
| +
|
| +const struct OutputSurface::Capabilities& FakeOutputSurface::Capabilities() const {
|
| + return capabilities_;
|
| +}
|
| +
|
| +WebKit::WebGraphicsContext3D* FakeOutputSurface::Context3D() const {
|
| + return context3d_.get();
|
| +}
|
| +
|
| +SoftwareOutputDevice* FakeOutputSurface::SoftwareDevice() const {
|
| + return software_device_.get();
|
| +}
|
| +
|
| +void FakeOutputSurface::SendFrameToParentCompositor(const CompositorFrame&) {}
|
| +
|
| +} // namespace cc
|
|
|