OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ | 5 #ifndef CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ |
6 #define CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ | 6 #define CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
10 | 10 |
11 #include "chrome/renderer/ggl/ggl.h" | 11 #include "chrome/renderer/ggl/ggl.h" |
12 #include "third_party/WebKit/WebKit/chromium/public/WebGLES2Context.h" | 12 #include "third_party/WebKit/WebKit/chromium/public/WebGLES2Context.h" |
13 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" |
14 | 14 |
15 class WebGLES2ContextImpl : public WebKit::WebGLES2Context { | 15 class WebGLES2ContextImpl : public WebKit::WebGLES2Context { |
16 public: | 16 public: |
17 WebGLES2ContextImpl(); | 17 WebGLES2ContextImpl(); |
18 virtual ~WebGLES2ContextImpl(); | 18 virtual ~WebGLES2ContextImpl(); |
19 | 19 |
20 // TODO(vangelis): Remove once method is removed from WebGLES2Context. | 20 // TODO(vangelis): Remove once method is removed from WebGLES2Context. |
21 virtual bool initialize(WebKit::WebView*); | 21 virtual bool initialize(WebKit::WebView*); |
22 virtual bool initialize(WebKit::WebView*, WebGLES2Context* parent); | 22 virtual bool initialize(WebKit::WebView*, WebGLES2Context* parent); |
23 virtual bool makeCurrent(); | 23 virtual bool makeCurrent(); |
24 virtual bool destroy(); | 24 virtual bool destroy(); |
25 virtual bool swapBuffers(); | 25 virtual bool swapBuffers(); |
26 | 26 |
27 virtual void resizeOffscreenContent(const WebKit::WebSize&); | 27 virtual void resizeOffscreenContent(const WebKit::WebSize&); |
28 virtual unsigned getOffscreenContentParentTextureId(); | 28 virtual unsigned getOffscreenContentParentTextureId(); |
29 | 29 |
| 30 #if defined(OS_MACOSX) |
| 31 virtual void resizeOnscreenContent(const WebKit::WebSize&); |
| 32 #endif |
| 33 |
30 ggl::Context* context() { return context_; } | 34 ggl::Context* context() { return context_; } |
31 | 35 |
32 private: | 36 private: |
33 // The GGL context we use for OpenGL rendering. | 37 // The GGL context we use for OpenGL rendering. |
34 ggl::Context* context_; | 38 ggl::Context* context_; |
35 WebKit::WebView* web_view_; | 39 WebKit::WebView* web_view_; |
36 }; | 40 }; |
37 | 41 |
38 #endif // defined(ENABLE_GPU) | 42 #endif // defined(ENABLE_GPU) |
39 #endif // CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ | 43 #endif // CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ |
40 | 44 |
OLD | NEW |