| 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 GLContextVirtual( | 29 GLContextVirtual( |
| 30 gfx::GLShareGroup* share_group, | 30 gfx::GLShareGroup* share_group, |
| 31 gfx::GLContext* shared_context, | 31 gfx::GLContext* shared_context, |
| 32 base::WeakPtr<gles2::GLES2Decoder> decoder); | 32 base::WeakPtr<gles2::GLES2Decoder> decoder); |
| 33 | 33 |
| 34 gfx::Display* display(); | 34 gfx::Display* display(); |
| 35 | 35 |
| 36 // Implement GLContext. | 36 // Implement GLContext. |
| 37 virtual bool Initialize( | 37 virtual bool Initialize( |
| 38 gfx::GLSurface* compatible_surface, | 38 gfx::GLSurface* compatible_surface, |
| 39 gfx::GpuPreference gpu_preference) OVERRIDE; | 39 gfx::GpuPreference gpu_preference) override; |
| 40 virtual void Destroy() OVERRIDE; | 40 virtual void Destroy() override; |
| 41 virtual bool MakeCurrent(gfx::GLSurface* surface) OVERRIDE; | 41 virtual bool MakeCurrent(gfx::GLSurface* surface) override; |
| 42 virtual void ReleaseCurrent(gfx::GLSurface* surface) OVERRIDE; | 42 virtual void ReleaseCurrent(gfx::GLSurface* surface) override; |
| 43 virtual bool IsCurrent(gfx::GLSurface* surface) OVERRIDE; | 43 virtual bool IsCurrent(gfx::GLSurface* surface) override; |
| 44 virtual void* GetHandle() OVERRIDE; | 44 virtual void* GetHandle() override; |
| 45 virtual void SetSwapInterval(int interval) OVERRIDE; | 45 virtual void SetSwapInterval(int interval) override; |
| 46 virtual std::string GetExtensions() OVERRIDE; | 46 virtual std::string GetExtensions() override; |
| 47 virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE; | 47 virtual bool GetTotalGpuMemory(size_t* bytes) override; |
| 48 virtual void SetSafeToForceGpuSwitch() OVERRIDE; | 48 virtual void SetSafeToForceGpuSwitch() override; |
| 49 virtual bool WasAllocatedUsingRobustnessExtension() OVERRIDE; | 49 virtual bool WasAllocatedUsingRobustnessExtension() override; |
| 50 virtual void SetUnbindFboOnMakeCurrent() OVERRIDE; | 50 virtual void SetUnbindFboOnMakeCurrent() override; |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 virtual ~GLContextVirtual(); | 53 virtual ~GLContextVirtual(); |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 scoped_refptr<gfx::GLContext> shared_context_; | 56 scoped_refptr<gfx::GLContext> shared_context_; |
| 57 gfx::Display* display_; | 57 gfx::Display* display_; |
| 58 base::WeakPtr<gles2::GLES2Decoder> decoder_; | 58 base::WeakPtr<gles2::GLES2Decoder> decoder_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(GLContextVirtual); | 60 DISALLOW_COPY_AND_ASSIGN(GLContextVirtual); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace gpu | 63 } // namespace gpu |
| 64 | 64 |
| 65 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ | 65 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ |
| OLD | NEW |