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 23 matching lines...) Expand all Loading... |
34 gfx::Display* display(); | 34 gfx::Display* display(); |
35 | 35 |
36 // Implement GLContext. | 36 // Implement GLContext. |
37 bool Initialize(gfx::GLSurface* compatible_surface, | 37 bool Initialize(gfx::GLSurface* compatible_surface, |
38 gfx::GpuPreference gpu_preference) override; | 38 gfx::GpuPreference gpu_preference) override; |
39 void Destroy() override; | 39 void Destroy() override; |
40 bool MakeCurrent(gfx::GLSurface* surface) override; | 40 bool MakeCurrent(gfx::GLSurface* surface) override; |
41 void ReleaseCurrent(gfx::GLSurface* surface) override; | 41 void ReleaseCurrent(gfx::GLSurface* surface) override; |
42 bool IsCurrent(gfx::GLSurface* surface) override; | 42 bool IsCurrent(gfx::GLSurface* surface) override; |
43 void* GetHandle() override; | 43 void* GetHandle() override; |
44 void SetSwapInterval(int interval) override; | 44 void OnSetSwapInterval(int interval) override; |
45 std::string GetExtensions() override; | 45 std::string GetExtensions() override; |
46 bool GetTotalGpuMemory(size_t* bytes) override; | 46 bool GetTotalGpuMemory(size_t* bytes) override; |
47 void SetSafeToForceGpuSwitch() override; | 47 void SetSafeToForceGpuSwitch() override; |
48 bool WasAllocatedUsingRobustnessExtension() override; | 48 bool WasAllocatedUsingRobustnessExtension() override; |
49 void SetUnbindFboOnMakeCurrent() override; | 49 void SetUnbindFboOnMakeCurrent() override; |
50 | 50 |
51 protected: | 51 protected: |
52 ~GLContextVirtual() override; | 52 ~GLContextVirtual() override; |
53 | 53 |
54 private: | 54 private: |
55 scoped_refptr<gfx::GLContext> shared_context_; | 55 scoped_refptr<gfx::GLContext> shared_context_; |
56 gfx::Display* display_; | 56 gfx::Display* display_; |
57 base::WeakPtr<gles2::GLES2Decoder> decoder_; | 57 base::WeakPtr<gles2::GLES2Decoder> decoder_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(GLContextVirtual); | 59 DISALLOW_COPY_AND_ASSIGN(GLContextVirtual); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace gpu | 62 } // namespace gpu |
63 | 63 |
64 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ | 64 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ |
OLD | NEW |