| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GL_GL_SURFACE_OSMESA_WIN_H_ | 5 #ifndef UI_GL_GL_SURFACE_OSMESA_WIN_H_ |
| 6 #define UI_GL_GL_SURFACE_OSMESA_WIN_H_ | 6 #define UI_GL_GL_SURFACE_OSMESA_WIN_H_ |
| 7 | 7 |
| 8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 #include "ui/gl/gl_export.h" | 12 #include "ui/gl/gl_export.h" |
| 13 #include "ui/gl/gl_surface.h" | 13 #include "ui/gl/gl_surface.h" |
| 14 #include "ui/gl/gl_surface_osmesa.h" | 14 #include "ui/gl/gl_surface_osmesa.h" |
| 15 | 15 |
| 16 namespace gl { | 16 namespace gl { |
| 17 | 17 |
| 18 // This OSMesa GL surface can use GDI to swap the contents of the buffer to a | 18 // This OSMesa GL surface can use GDI to swap the contents of the buffer to a |
| 19 // view. | 19 // view. |
| 20 class GL_EXPORT GLSurfaceOSMesaWin : public GLSurfaceOSMesa { | 20 class GL_EXPORT GLSurfaceOSMesaWin : public GLSurfaceOSMesa { |
| 21 public: | 21 public: |
| 22 explicit GLSurfaceOSMesaWin(gfx::AcceleratedWidget window); | 22 explicit GLSurfaceOSMesaWin(gfx::AcceleratedWidget window); |
| 23 | 23 |
| 24 // Implement subset of GLSurface. | 24 // Implement subset of GLSurface. |
| 25 bool Initialize(GLSurface::Format format) override; | 25 bool Initialize(GLSurfaceFormat format) override; |
| 26 void Destroy() override; | 26 void Destroy() override; |
| 27 bool IsOffscreen() override; | 27 bool IsOffscreen() override; |
| 28 gfx::SwapResult SwapBuffers() override; | 28 gfx::SwapResult SwapBuffers() override; |
| 29 bool SupportsPostSubBuffer() override; | 29 bool SupportsPostSubBuffer() override; |
| 30 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; | 30 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 ~GLSurfaceOSMesaWin() override; | 33 ~GLSurfaceOSMesaWin() override; |
| 34 | 34 |
| 35 gfx::AcceleratedWidget window_; | 35 gfx::AcceleratedWidget window_; |
| 36 HDC device_context_; | 36 HDC device_context_; |
| 37 | 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaWin); | 38 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaWin); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace gl | 41 } // namespace gl |
| 42 | 42 |
| 43 #endif // UI_GL_GL_SURFACE_OSMESA_WIN_H_ | 43 #endif // UI_GL_GL_SURFACE_OSMESA_WIN_H_ |
| OLD | NEW |