summaryrefslogtreecommitdiffstats
path: root/cc/test/pixel_test_output_surface.h
blob: 91d789fc76fc95e1217cbf19387b0f5925122830 (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
// 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 CC_TEST_PIXEL_TEST_GRAPHICS_CONTEXT_H_
#define CC_TEST_PIXEL_TEST_GRAPHICS_CONTEXT_H_

#include "base/memory/scoped_ptr.h"
#include "cc/output_surface.h"

namespace cc {

class PixelTestOutputSurface : public OutputSurface {
 public:
  static scoped_ptr<PixelTestOutputSurface> create() {
    return make_scoped_ptr(new PixelTestOutputSurface);
  }

  virtual ~PixelTestOutputSurface();

  // OutputSurface overrides.
  virtual bool BindToClient(OutputSurfaceClient*) OVERRIDE;
  virtual const struct OutputSurface::Capabilities& Capabilities() const
      OVERRIDE;
  virtual WebKit::WebGraphicsContext3D* Context3D() const OVERRIDE;
  virtual SoftwareOutputDevice* SoftwareDevice() const OVERRIDE;
  virtual void SendFrameToParentCompositor(CompositorFrame*) OVERRIDE {}

 private:
  PixelTestOutputSurface();

  scoped_ptr<WebKit::WebGraphicsContext3D> context_;
};

}  // namespace cc

#endif  // CC_TEST_PIXEL_TEST_GRAPHICS_CONTEXT_H_