Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / gl / gl_image_egl.h
bloba4abd2489c3d3d380e0131796a35d394a9123716
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_GL_GL_IMAGE_EGL_H_
6 #define UI_GL_GL_IMAGE_EGL_H_
8 #include "base/threading/thread_checker.h"
9 #include "ui/gl/gl_bindings.h"
10 #include "ui/gl/gl_image.h"
12 namespace gfx {
14 class GL_EXPORT GLImageEGL : public GLImage {
15 public:
16 explicit GLImageEGL(const gfx::Size& size);
18 bool Initialize(EGLenum target, EGLClientBuffer buffer, const EGLint* attrs);
20 // Overridden from GLImage:
21 void Destroy(bool have_context) override;
22 gfx::Size GetSize() override;
23 bool BindTexImage(unsigned target) override;
24 void ReleaseTexImage(unsigned target) override {}
25 bool CopyTexImage(unsigned target) override;
26 void WillUseTexImage() override {}
27 void DidUseTexImage() override {}
28 void WillModifyTexImage() override {}
29 void DidModifyTexImage() override {}
30 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
31 int z_order,
32 OverlayTransform transform,
33 const Rect& bounds_rect,
34 const RectF& crop_rect) override;
36 protected:
37 ~GLImageEGL() override;
39 EGLImageKHR egl_image_;
40 const gfx::Size size_;
41 base::ThreadChecker thread_checker_;
43 private:
44 DISALLOW_COPY_AND_ASSIGN(GLImageEGL);
47 } // namespace gfx
49 #endif // UI_GL_GL_IMAGE_EGL_H_