summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_graphics_context.h
blob: aaeb964d2ee86ef14558ee8c5e5334a608c71902 (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 "CCGraphicsContext.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