OLD | NEW |
(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_ |
OLD | NEW |