OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_GFX_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 5 #ifndef UI_GFX_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
6 #define UI_GFX_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 6 #define UI_GFX_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
13 #include "ui/gfx/gl/gl_bindings.h" | 13 #include "ui/gfx/gl/gl_bindings.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class GLContext; | 16 class GLContext; |
17 class GLSurface; | 17 class GLSurface; |
18 } | 18 } |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 | 21 |
22 // WebGraphicsContext3D that does nothing. Suitable for testing. | 22 // WebGraphicsContext3D that does nothing. Suitable for testing. |
23 class TestWebGraphicsContext3D : public WebKit::WebGraphicsContext3D { | 23 class TestWebGraphicsContext3D : public WebKit::WebGraphicsContext3D { |
24 public: | 24 public: |
25 TestWebGraphicsContext3D(); | 25 TestWebGraphicsContext3D(); |
26 virtual ~TestWebGraphicsContext3D(); | 26 virtual ~TestWebGraphicsContext3D(); |
27 | 27 |
28 virtual bool initialize(Attributes attributes, | 28 void Initialize(); |
29 WebKit::WebView* view, | |
30 bool render_directly_to_web_view); | |
31 virtual bool makeContextCurrent(); | 29 virtual bool makeContextCurrent(); |
32 virtual int width(); | 30 virtual int width(); |
33 virtual int height(); | 31 virtual int height(); |
34 virtual void reshape(int width, int height) {} | 32 virtual void reshape(int width, int height) {} |
35 virtual bool isGLES2Compliant(); | 33 virtual bool isGLES2Compliant(); |
36 virtual bool readBackFramebuffer(unsigned char* pixels, | 34 virtual bool readBackFramebuffer(unsigned char* pixels, |
37 size_t bufferSize, | 35 size_t bufferSize, |
38 WebKit::WebGLId framebuffer, | 36 WebKit::WebGLId framebuffer, |
39 int width, | 37 int width, |
40 int height); | 38 int height); |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 private: | 427 private: |
430 scoped_refptr<gfx::GLContext> gl_context_; | 428 scoped_refptr<gfx::GLContext> gl_context_; |
431 scoped_refptr<gfx::GLSurface> gl_surface_; | 429 scoped_refptr<gfx::GLSurface> gl_surface_; |
432 | 430 |
433 DISALLOW_COPY_AND_ASSIGN(TestWebGraphicsContext3D); | 431 DISALLOW_COPY_AND_ASSIGN(TestWebGraphicsContext3D); |
434 }; | 432 }; |
435 | 433 |
436 } // namespace ui | 434 } // namespace ui |
437 | 435 |
438 #endif // UI_GFX_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 436 #endif // UI_GFX_COMPOSITOR_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
OLD | NEW |