OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ | 5 #ifndef COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ |
6 #define COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ | 6 #define COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 class CommandBufferDriver; | 30 class CommandBufferDriver; |
31 class CommandBufferImpl; | 31 class CommandBufferImpl; |
32 class CommandBufferLocal; | 32 class CommandBufferLocal; |
33 class GpuState; | 33 class GpuState; |
34 class SurfacesContextProviderDelegate; | 34 class SurfacesContextProviderDelegate; |
35 | 35 |
36 class SurfacesContextProvider : public cc::ContextProvider, | 36 class SurfacesContextProvider : public cc::ContextProvider, |
37 public CommandBufferLocalClient, | 37 public CommandBufferLocalClient, |
38 public base::NonThreadSafe { | 38 public base::NonThreadSafe { |
39 public: | 39 public: |
40 SurfacesContextProvider(SurfacesContextProviderDelegate* delegate, | 40 SurfacesContextProvider(gfx::AcceleratedWidget widget, |
41 gfx::AcceleratedWidget widget, | |
42 const scoped_refptr<GpuState>& state); | 41 const scoped_refptr<GpuState>& state); |
43 | 42 |
| 43 void SetDelegate(SurfacesContextProviderDelegate* delegate); |
| 44 |
44 // cc::ContextProvider implementation. | 45 // cc::ContextProvider implementation. |
45 bool BindToCurrentThread() override; | 46 bool BindToCurrentThread() override; |
46 gpu::gles2::GLES2Interface* ContextGL() override; | 47 gpu::gles2::GLES2Interface* ContextGL() override; |
47 gpu::ContextSupport* ContextSupport() override; | 48 gpu::ContextSupport* ContextSupport() override; |
48 class GrContext* GrContext() override; | 49 class GrContext* GrContext() override; |
49 void InvalidateGrContext(uint32_t state) override; | 50 void InvalidateGrContext(uint32_t state) override; |
50 Capabilities ContextCapabilities() override; | 51 Capabilities ContextCapabilities() override; |
51 void DeleteCachedResources() override {} | 52 void DeleteCachedResources() override {} |
52 void SetLostContextCallback( | 53 void SetLostContextCallback( |
53 const LostContextCallback& lost_context_callback) override; | 54 const LostContextCallback& lost_context_callback) override; |
(...skipping 23 matching lines...) Expand all Loading... |
77 CommandBufferLocal* command_buffer_local_; | 78 CommandBufferLocal* command_buffer_local_; |
78 | 79 |
79 base::Lock context_lock_; | 80 base::Lock context_lock_; |
80 | 81 |
81 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider); | 82 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider); |
82 }; | 83 }; |
83 | 84 |
84 } // namespace mus | 85 } // namespace mus |
85 | 86 |
86 #endif // COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ | 87 #endif // COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ |
OLD | NEW |