blob: 9e48133c98e142e7027436ebb846bd1dc99626b7 (
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
|
// Copyright 2013 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 ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_
#define ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_
#include "ui/gl/gl_surface.h"
namespace android_webview {
// This surface is used to represent the underlying surface provided by the App
// inside a hardware draw. Note that offscreen contexts will not be using this
// GLSurface.
class GL_EXPORT AwGLSurface : public gfx::GLSurface {
public:
AwGLSurface();
// Implement GLSurface.
virtual void Destroy() override;
virtual bool IsOffscreen() override;
virtual unsigned int GetBackingFrameBufferObject() override;
virtual bool SwapBuffers() override;
virtual gfx::Size GetSize() override;
virtual void* GetHandle() override;
virtual void* GetDisplay() override;
void SetBackingFrameBufferObject(unsigned int fbo);
void ResetBackingFrameBufferObject();
protected:
virtual ~AwGLSurface();
private:
unsigned int fbo_;
DISALLOW_COPY_AND_ASSIGN(AwGLSurface);
};
} // namespace android_webview
#endif // ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_
|