OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CompositorFakeWebGraphicsContext3D_h | 5 // Temporary forwarding header |
6 #define CompositorFakeWebGraphicsContext3D_h | 6 #include "cc/test/compositor_fake_web_graphics_context_3d.h" |
7 | |
8 #include "FakeWebGraphicsContext3D.h" | |
9 #include <wtf/PassOwnPtr.h> | |
10 | |
11 namespace WebKit { | |
12 | |
13 // Test stub for WebGraphicsContext3D. Returns canned values needed for composit
or initialization. | |
14 class CompositorFakeWebGraphicsContext3D : public FakeWebGraphicsContext3D { | |
15 public: | |
16 static PassOwnPtr<CompositorFakeWebGraphicsContext3D> create(Attributes attr
s) | |
17 { | |
18 return adoptPtr(new CompositorFakeWebGraphicsContext3D(attrs)); | |
19 } | |
20 | |
21 virtual bool makeContextCurrent() { return true; } | |
22 virtual WebGLId createProgram() { return 1; } | |
23 virtual WebGLId createShader(WGC3Denum) { return 1; } | |
24 virtual void getShaderiv(WebGLId, WGC3Denum, WGC3Dint* value) { *value = 1;
} | |
25 virtual void getProgramiv(WebGLId, WGC3Denum, WGC3Dint* value) { *value = 1;
} | |
26 | |
27 protected: | |
28 explicit CompositorFakeWebGraphicsContext3D(Attributes attrs) | |
29 { | |
30 m_attrs = attrs; | |
31 } | |
32 }; | |
33 | |
34 } | |
35 | |
36 #endif | |
OLD | NEW |