Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: webkit/compositor_bindings/web_compositor_support_output_surface.h

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forlanding6 Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_OUTPUT_SURFACE
6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_OUTPUT_SURFACE
7
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/output_surface.h"
10 #include "webkit/compositor_bindings/web_compositor_support_software_output_devi ce.h"
11
12 namespace webkit {
13
14 class WebCompositorSupportOutputSurface : public cc::OutputSurface {
15 public:
16
17 static inline scoped_ptr<WebCompositorSupportOutputSurface> Create3d(
18 scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
19 return make_scoped_ptr(
20 new WebCompositorSupportOutputSurface(context3d.Pass()));
21 }
22
23 static inline scoped_ptr<WebCompositorSupportOutputSurface> CreateSoftware(
24 scoped_ptr<cc::SoftwareOutputDevice> software_device) {
25 return make_scoped_ptr(
26 new WebCompositorSupportOutputSurface(software_device.Pass()));
27 }
28
29 virtual ~WebCompositorSupportOutputSurface();
30
31 virtual bool BindToClient(cc::OutputSurfaceClient*) OVERRIDE;
32
33 virtual const struct Capabilities& Capabilities() const OVERRIDE;
34
35 virtual WebKit::WebGraphicsContext3D* Context3D() const OVERRIDE;
36 virtual cc::SoftwareOutputDevice* SoftwareDevice() const OVERRIDE;
37
38 virtual void SendFrameToParentCompositor(const cc::CompositorFrame&) OVERRIDE;
39
40 private:
41 explicit WebCompositorSupportOutputSurface(
42 scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
43 explicit WebCompositorSupportOutputSurface(
44 scoped_ptr<cc::SoftwareOutputDevice> software_device);
45
46 struct cc::OutputSurface::Capabilities capabilities_;
47 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
48 scoped_ptr<cc::SoftwareOutputDevice> software_device_;
49 };
50
51 } // namespace webkit
52
53 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_OUTPUT_SURFACE
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698