| 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 CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 PlatformContext3D* share_context) OVERRIDE; | 39 PlatformContext3D* share_context) OVERRIDE; |
| 40 virtual unsigned GetBackingTextureId() OVERRIDE; | 40 virtual unsigned GetBackingTextureId() OVERRIDE; |
| 41 virtual bool IsOpaque() OVERRIDE; | 41 virtual bool IsOpaque() OVERRIDE; |
| 42 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; | 42 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; |
| 43 virtual int GetCommandBufferRouteId() OVERRIDE; | 43 virtual int GetCommandBufferRouteId() OVERRIDE; |
| 44 virtual void SetContextLostCallback(const base::Closure& callback) OVERRIDE; | 44 virtual void SetContextLostCallback(const base::Closure& callback) OVERRIDE; |
| 45 virtual void SetOnConsoleMessageCallback( | 45 virtual void SetOnConsoleMessageCallback( |
| 46 const ConsoleMessageCallback& callback) OVERRIDE; | 46 const ConsoleMessageCallback& callback) OVERRIDE; |
| 47 virtual bool Echo(const base::Closure& task) OVERRIDE; | 47 virtual bool Echo(const base::Closure& task) OVERRIDE; |
| 48 | 48 |
| 49 virtual void SetParentContext( |
| 50 PepperParentContextProvider* parent_context_provider); |
| 51 |
| 49 private: | 52 private: |
| 50 bool InitRaw(); | 53 bool InitRaw(); |
| 51 void OnContextLost(); | 54 void OnContextLost(); |
| 52 void OnConsoleMessage(const std::string& msg, int id); | 55 void OnConsoleMessage(const std::string& msg, int id); |
| 53 | 56 |
| 54 // Implicitly weak pointer; must outlive this instance. | 57 // Implicitly weak pointer; must outlive this instance. |
| 55 PepperParentContextProvider* parent_context_provider_; | 58 PepperParentContextProvider* parent_context_provider_; |
| 56 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> parent_context_; | 59 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> parent_context_; |
| 57 scoped_refptr<GpuChannelHost> channel_; | 60 scoped_refptr<GpuChannelHost> channel_; |
| 58 unsigned int parent_texture_id_; | 61 unsigned int parent_texture_id_; |
| 59 bool has_alpha_; | 62 bool has_alpha_; |
| 60 CommandBufferProxy* command_buffer_; | 63 CommandBufferProxy* command_buffer_; |
| 61 base::Closure context_lost_callback_; | 64 base::Closure context_lost_callback_; |
| 62 ConsoleMessageCallback console_message_callback_; | 65 ConsoleMessageCallback console_message_callback_; |
| 63 base::WeakPtrFactory<PlatformContext3DImpl> weak_ptr_factory_; | 66 base::WeakPtrFactory<PlatformContext3DImpl> weak_ptr_factory_; |
| 64 }; | 67 }; |
| 65 | 68 |
| 66 } // namespace content | 69 } // namespace content |
| 67 | 70 |
| 68 #endif // ENABLE_GPU | 71 #endif // ENABLE_GPU |
| 69 | 72 |
| 70 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 73 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
| OLD | NEW |