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

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

Issue 2047283003: Move GLSurface creation from //ui/gl to //ui/gl/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gl_context
Patch Set: Fix Ozone CreateViewGLSurface logic. 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_surface_osmesa.h ('k') | ui/gl/gl_surface_osmesa_win.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_WIN_H_
6 #define UI_GL_GL_SURFACE_OSMESA_WIN_H_
7
8 #include <dwmapi.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 GDI to swap the contents of the buffer to a
19 // view.
20 class GL_EXPORT GLSurfaceOSMesaWin : public GLSurfaceOSMesa {
21 public:
22 explicit GLSurfaceOSMesaWin(gfx::AcceleratedWidget window);
23
24 // Implement subset of GLSurface.
25 bool Initialize(GLSurface::Format format) override;
26 void Destroy() override;
27 bool IsOffscreen() override;
28 gfx::SwapResult SwapBuffers() override;
29 bool SupportsPostSubBuffer() override;
30 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
31
32 private:
33 ~GLSurfaceOSMesaWin() override;
34
35 gfx::AcceleratedWidget window_;
36 HDC device_context_;
37
38 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaWin);
39 };
40
41 } // namespace gl
42
43 #endif // UI_GL_GL_SURFACE_OSMESA_WIN_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_osmesa.h ('k') | ui/gl/gl_surface_osmesa_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698