blob: d77313bf780efab4b65d9dadaa7b060fc6f341b3 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright (c) 2010 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 CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_
#define CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_
#pragma once
#if defined(ENABLE_GPU)
#include "chrome/renderer/ggl/ggl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebGLES2Context.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#if defined(OS_MACOSX)
#include "gfx/native_widget_types.h"
#endif
class WebGLES2ContextImpl : public WebKit::WebGLES2Context {
public:
WebGLES2ContextImpl();
virtual ~WebGLES2ContextImpl();
// TODO(vangelis): Remove once method is removed from WebGLES2Context.
virtual bool initialize(WebKit::WebView*);
virtual bool initialize(WebKit::WebView*, WebGLES2Context* parent);
virtual bool makeCurrent();
virtual bool destroy();
virtual bool swapBuffers();
virtual void resizeOffscreenContent(const WebKit::WebSize&);
virtual unsigned getOffscreenContentParentTextureId();
#if defined(OS_MACOSX)
virtual void resizeOnscreenContent(const WebKit::WebSize&);
#endif
ggl::Context* context() { return context_; }
private:
// The GGL context we use for OpenGL rendering.
ggl::Context* context_;
#if defined(OS_MACOSX)
gfx::PluginWindowHandle plugin_handle_;
WebKit::WebView* web_view_;
#endif
};
#endif // defined(ENABLE_GPU)
#endif // CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_
|