| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/gl/gl_surface.h" | 5 #include "ui/gl/gl_surface.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // This OSMesa GL surface can use XLib to swap the contents of the buffer to a | 22 // This OSMesa GL surface can use XLib to swap the contents of the buffer to a |
| 23 // view. | 23 // view. |
| 24 class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa { | 24 class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa { |
| 25 public: | 25 public: |
| 26 explicit NativeViewGLSurfaceOSMesa(gfx::AcceleratedWidget window); | 26 explicit NativeViewGLSurfaceOSMesa(gfx::AcceleratedWidget window); |
| 27 | 27 |
| 28 static bool InitializeOneOff(); | 28 static bool InitializeOneOff(); |
| 29 | 29 |
| 30 // Implement a subset of GLSurface. | 30 // Implement a subset of GLSurface. |
| 31 virtual bool Initialize() OVERRIDE; | 31 virtual bool Initialize() override; |
| 32 virtual void Destroy() OVERRIDE; | 32 virtual void Destroy() override; |
| 33 virtual bool Resize(const gfx::Size& new_size) OVERRIDE; | 33 virtual bool Resize(const gfx::Size& new_size) override; |
| 34 virtual bool IsOffscreen() OVERRIDE; | 34 virtual bool IsOffscreen() override; |
| 35 virtual bool SwapBuffers() OVERRIDE; | 35 virtual bool SwapBuffers() override; |
| 36 virtual bool SupportsPostSubBuffer() OVERRIDE; | 36 virtual bool SupportsPostSubBuffer() override; |
| 37 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 37 virtual bool PostSubBuffer(int x, int y, int width, int height) override; |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 virtual ~NativeViewGLSurfaceOSMesa(); | 40 virtual ~NativeViewGLSurfaceOSMesa(); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 Display* xdisplay_; | 43 Display* xdisplay_; |
| 44 GC window_graphics_context_; | 44 GC window_graphics_context_; |
| 45 gfx::AcceleratedWidget window_; | 45 gfx::AcceleratedWidget window_; |
| 46 GC pixmap_graphics_context_; | 46 GC pixmap_graphics_context_; |
| 47 Pixmap pixmap_; | 47 Pixmap pixmap_; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 NOTREACHED(); | 338 NOTREACHED(); |
| 339 return NULL; | 339 return NULL; |
| 340 } | 340 } |
| 341 } | 341 } |
| 342 | 342 |
| 343 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 343 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
| 344 return gfx::GetXDisplay(); | 344 return gfx::GetXDisplay(); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace gfx | 347 } // namespace gfx |
| OLD | NEW |