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 <string> | 8 #include <string> |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 bool MakeCurrent(gfx::GLSurface* surface) override; | 39 bool MakeCurrent(gfx::GLSurface* surface) override; |
40 void ReleaseCurrent(gfx::GLSurface* surface) override; | 40 void ReleaseCurrent(gfx::GLSurface* surface) override; |
41 bool IsCurrent(gfx::GLSurface* surface) override; | 41 bool IsCurrent(gfx::GLSurface* surface) override; |
42 void* GetHandle() override; | 42 void* GetHandle() override; |
43 scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() override; | 43 scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() override; |
44 void OnSetSwapInterval(int interval) override; | 44 void OnSetSwapInterval(int interval) override; |
45 std::string GetExtensions() override; | 45 std::string GetExtensions() override; |
46 void SetSafeToForceGpuSwitch() override; | 46 void SetSafeToForceGpuSwitch() override; |
47 bool WasAllocatedUsingRobustnessExtension() override; | 47 bool WasAllocatedUsingRobustnessExtension() override; |
48 void SetUnbindFboOnMakeCurrent() override; | 48 void SetUnbindFboOnMakeCurrent() override; |
| 49 void UpdateSharedContext(gfx::GLContext* shared_context) override; |
49 base::Closure GetStateWasDirtiedExternallyCallback() override; | 50 base::Closure GetStateWasDirtiedExternallyCallback() override; |
50 void RestoreStateIfDirtiedExternally() override; | 51 void RestoreStateIfDirtiedExternally() override; |
51 | 52 |
52 protected: | 53 protected: |
53 ~GLContextVirtual() override; | 54 ~GLContextVirtual() override; |
54 | 55 |
55 private: | 56 private: |
56 void Destroy(); | 57 void Destroy(); |
57 | 58 |
58 scoped_refptr<gfx::GLContext> shared_context_; | 59 scoped_refptr<gfx::GLContext> shared_context_; |
59 base::WeakPtr<gles2::GLES2Decoder> decoder_; | 60 base::WeakPtr<gles2::GLES2Decoder> decoder_; |
60 | 61 |
61 DISALLOW_COPY_AND_ASSIGN(GLContextVirtual); | 62 DISALLOW_COPY_AND_ASSIGN(GLContextVirtual); |
62 }; | 63 }; |
63 | 64 |
64 } // namespace gpu | 65 } // namespace gpu |
65 | 66 |
66 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ | 67 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ |
OLD | NEW |