| 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 21 matching lines...) Expand all Loading... |
| 32 class CommandBufferDriver; | 32 class CommandBufferDriver; |
| 33 class CommandBufferImpl; | 33 class CommandBufferImpl; |
| 34 class CommandBufferLocal; | 34 class CommandBufferLocal; |
| 35 class GpuState; | 35 class GpuState; |
| 36 class SurfacesContextProviderDelegate; | 36 class SurfacesContextProviderDelegate; |
| 37 | 37 |
| 38 class SurfacesContextProvider : public cc::ContextProvider, | 38 class SurfacesContextProvider : public cc::ContextProvider, |
| 39 public CommandBufferLocalClient, | 39 public CommandBufferLocalClient, |
| 40 public base::NonThreadSafe { | 40 public base::NonThreadSafe { |
| 41 public: | 41 public: |
| 42 SurfacesContextProvider(SurfacesContextProviderDelegate* delegate, | 42 SurfacesContextProvider(gfx::AcceleratedWidget widget, |
| 43 gfx::AcceleratedWidget widget, | |
| 44 const scoped_refptr<GpuState>& state); | 43 const scoped_refptr<GpuState>& state); |
| 45 | 44 |
| 45 void SetDelegate(SurfacesContextProviderDelegate* delegate); |
| 46 |
| 46 // cc::ContextProvider implementation. | 47 // cc::ContextProvider implementation. |
| 47 bool BindToCurrentThread() override; | 48 bool BindToCurrentThread() override; |
| 48 gpu::gles2::GLES2Interface* ContextGL() override; | 49 gpu::gles2::GLES2Interface* ContextGL() override; |
| 49 gpu::ContextSupport* ContextSupport() override; | 50 gpu::ContextSupport* ContextSupport() override; |
| 50 class GrContext* GrContext() override; | 51 class GrContext* GrContext() override; |
| 51 void InvalidateGrContext(uint32_t state) override; | 52 void InvalidateGrContext(uint32_t state) override; |
| 52 Capabilities ContextCapabilities() override; | 53 Capabilities ContextCapabilities() override; |
| 53 void DeleteCachedResources() override {} | 54 void DeleteCachedResources() override {} |
| 54 void SetLostContextCallback( | 55 void SetLostContextCallback( |
| 55 const LostContextCallback& lost_context_callback) override; | 56 const LostContextCallback& lost_context_callback) override; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 86 gfx::GLSurface::SwapCompletionCallback swap_buffers_completion_callback_; | 87 gfx::GLSurface::SwapCompletionCallback swap_buffers_completion_callback_; |
| 87 | 88 |
| 88 base::Lock context_lock_; | 89 base::Lock context_lock_; |
| 89 | 90 |
| 90 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider); | 91 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider); |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 } // namespace mus | 94 } // namespace mus |
| 94 | 95 |
| 95 #endif // COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ | 96 #endif // COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ |
| OLD | NEW |