Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: ui/gl/gl_surface_osmesa_x11.h

Issue 2022103002: Move GLSurfaceOSMesaX11 into it's own source file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_surface_osmesa_x11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #ifndef UI_GL_GL_SURFACE_OSMESA_X11_H_
6 #define UI_GL_GL_SURFACE_OSMESA_X11_H_
7
8 #include <X11/Xlib.h>
9
10 #include "base/macros.h"
11 #include "ui/gfx/native_widget_types.h"
12 #include "ui/gl/gl_export.h"
13 #include "ui/gl/gl_surface.h"
14 #include "ui/gl/gl_surface_osmesa.h"
15
16 namespace gl {
17
18 // This OSMesa GL surface can use XLib to swap the contents of the buffer to a
19 // view.
20 class GL_EXPORT GLSurfaceOSMesaX11 : public GLSurfaceOSMesa {
21 public:
22 explicit GLSurfaceOSMesaX11(gfx::AcceleratedWidget window);
23
24 static bool InitializeOneOff();
25
26 // Implement a subset of GLSurface.
27 bool Initialize(GLSurface::Format format) override;
28 void Destroy() override;
29 bool Resize(const gfx::Size& new_size,
30 float scale_factor,
31 bool alpha) override;
32 bool IsOffscreen() override;
33 gfx::SwapResult SwapBuffers() override;
34 bool SupportsPostSubBuffer() override;
35 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
36
37 protected:
38 ~GLSurfaceOSMesaX11() override;
39
40 private:
41 Display* xdisplay_;
42 GC window_graphics_context_;
43 gfx::AcceleratedWidget window_;
44 GC pixmap_graphics_context_;
45 Pixmap pixmap_;
46
47 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaX11);
48 };
49
50 } // namespace gl
51
52 #endif // UI_GL_GL_SURFACE_OSMESA_X11_H_
OLDNEW
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_surface_osmesa_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698