| OLD | NEW | 
|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 5 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 
| 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <memory> | 10 #include <memory> | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
| 38       gpu::ImageFactory* image_factory, | 38       gpu::ImageFactory* image_factory, | 
| 39       gfx::AcceleratedWidget window, | 39       gfx::AcceleratedWidget window, | 
| 40       const std::string& debug_name); | 40       const std::string& debug_name); | 
| 41 | 41 | 
| 42   // Uses default attributes for creating an offscreen context. | 42   // Uses default attributes for creating an offscreen context. | 
| 43   static scoped_refptr<InProcessContextProvider> CreateOffscreen( | 43   static scoped_refptr<InProcessContextProvider> CreateOffscreen( | 
| 44       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 44       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 
| 45       gpu::ImageFactory* image_factory, | 45       gpu::ImageFactory* image_factory, | 
| 46       InProcessContextProvider* shared_context); | 46       InProcessContextProvider* shared_context); | 
| 47 | 47 | 
| 48   // cc::ContextProvider: | 48   // cc::ContextProvider implementation. | 
| 49   bool BindToCurrentThread() override; | 49   bool BindToCurrentThread() override; | 
| 50   void DetachFromThread() override; | 50   void DetachFromThread() override; | 
| 51   gpu::Capabilities ContextCapabilities() override; | 51   gpu::Capabilities ContextCapabilities() override; | 
| 52   gpu::gles2::GLES2Interface* ContextGL() override; | 52   gpu::gles2::GLES2Interface* ContextGL() override; | 
| 53   gpu::ContextSupport* ContextSupport() override; | 53   gpu::ContextSupport* ContextSupport() override; | 
| 54   class GrContext* GrContext() override; | 54   class GrContext* GrContext() override; | 
| 55   void InvalidateGrContext(uint32_t state) override; | 55   void InvalidateGrContext(uint32_t state) override; | 
| 56   base::Lock* GetLock() override; | 56   base::Lock* GetLock() override; | 
| 57   void DeleteCachedResources() override; | 57   void DeleteCachedResources() override; | 
| 58   void SetLostContextCallback( | 58   void SetLostContextCallback( | 
| 59       const LostContextCallback& lost_context_callback) override; | 59       const LostContextCallback& lost_context_callback) override; | 
| 60 | 60 | 
|  | 61   // Gives the GL internal format that should be used for calling CopyTexImage2D | 
|  | 62   // on the default framebuffer. | 
|  | 63   uint32_t GetCopyTextureInternalFormat(); | 
|  | 64 | 
| 61  private: | 65  private: | 
| 62   InProcessContextProvider( | 66   InProcessContextProvider( | 
| 63       const gpu::gles2::ContextCreationAttribHelper& attribs, | 67       const gpu::gles2::ContextCreationAttribHelper& attribs, | 
| 64       InProcessContextProvider* shared_context, | 68       InProcessContextProvider* shared_context, | 
| 65       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 69       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 
| 66       gpu::ImageFactory* image_factory, | 70       gpu::ImageFactory* image_factory, | 
| 67       gfx::AcceleratedWidget window, | 71       gfx::AcceleratedWidget window, | 
| 68       const std::string& debug_name); | 72       const std::string& debug_name); | 
| 69   ~InProcessContextProvider() override; | 73   ~InProcessContextProvider() override; | 
| 70 | 74 | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 82   std::string debug_name_; | 86   std::string debug_name_; | 
| 83 | 87 | 
| 84   base::Lock context_lock_; | 88   base::Lock context_lock_; | 
| 85 | 89 | 
| 86   DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider); | 90   DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider); | 
| 87 }; | 91 }; | 
| 88 | 92 | 
| 89 }  // namespace ui | 93 }  // namespace ui | 
| 90 | 94 | 
| 91 #endif  // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 95 #endif  // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 
| OLD | NEW | 
|---|