blob: f7d9ac01f6c36f808ffcfb8f79269f686cdcc265 (
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
|
// 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_layer_tree_host_client.h"
namespace cc {
scoped_ptr<OutputSurface> FakeLayerImplTreeHostClient::createOutputSurface()
{
if (m_useSoftwareRendering) {
if (m_useDelegatingRenderer)
return FakeOutputSurface::CreateDelegatingSoftware(make_scoped_ptr(new FakeSoftwareOutputDevice).PassAs<SoftwareOutputDevice>()).PassAs<OutputSurface>();
return FakeOutputSurface::CreateSoftware(make_scoped_ptr(new FakeSoftwareOutputDevice).PassAs<SoftwareOutputDevice>()).PassAs<OutputSurface>();
}
WebKit::WebGraphicsContext3D::Attributes attrs;
if (m_useDelegatingRenderer)
return FakeOutputSurface::CreateDelegating3d(FakeWebGraphicsContext3D::Create(attrs).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<OutputSurface>();
return FakeOutputSurface::Create3d(FakeWebGraphicsContext3D::Create(attrs).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<OutputSurface>();
}
scoped_ptr<InputHandler> FakeLayerImplTreeHostClient::createInputHandler()
{
return scoped_ptr<InputHandler>();
}
scoped_ptr<FontAtlas> FakeLayerImplTreeHostClient::createFontAtlas()
{
return scoped_ptr<FontAtlas>();
}
} // namespace cc
|