Add ICU message format support
[chromium-blink-merge.git] / ui / gl / gl_image_egl.h
blob14cc40b42277cbde05dc598f69ead312326966d4
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 unsigned GetInternalFormat() override;
24 bool BindTexImage(unsigned target) override;
25 void ReleaseTexImage(unsigned target) override {}
26 bool CopyTexSubImage(unsigned target,
27 const Point& offset,
28 const Rect& rect) override;
29 void WillUseTexImage() override {}
30 void DidUseTexImage() override {}
31 void WillModifyTexImage() override {}
32 void DidModifyTexImage() override {}
33 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
34 int z_order,
35 OverlayTransform transform,
36 const Rect& bounds_rect,
37 const RectF& crop_rect) override;
39 protected:
40 ~GLImageEGL() override;
42 EGLImageKHR egl_image_;
43 const gfx::Size size_;
44 base::ThreadChecker thread_checker_;
46 private:
47 DISALLOW_COPY_AND_ASSIGN(GLImageEGL);
50 } // namespace gfx
52 #endif // UI_GL_GL_IMAGE_EGL_H_