summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_graphics_context.h
blob: 7fdb38aa77b645831b4ed6008fa16570f29c1cc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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.

#ifndef FakeCCGraphicsContext_h
#define FakeCCGraphicsContext_h

#include "cc/graphics_context.h"
#include "cc/test/compositor_fake_web_graphics_context_3d.h"
#include "cc/test/fake_web_compositor_output_surface.h"
#include <public/WebCompositorOutputSurface.h>

namespace WebKit {

static inline scoped_ptr<cc::GraphicsContext> createFakeGraphicsContext()
{
    return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes()).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<cc::GraphicsContext>();
}

} // namespace WebKit

#endif // FakeCCGraphicsContext_h